CMS-3570 Fixed some tests.
CMS-3570 Added some more tests.