EasyMock.replay(formService, context);
Response resp = restService.getForm("somePackage", "myFormId", context);
EasyMock.verify(formService, context);
Object entity = assertXmlOkResponse(resp);
ListFormsDTO dto = (ListFormsDTO) entity;
assertNotNull("dto.getForm() shouldn't be null", dto.getForm());
assertEquals("dto.getForm() should be of one element but it is of size " + dto.getForm().size(), dto.getForm().size(), 1);
FormDefDTO formDto = dto.getForm().iterator().next();
assertTrue("formDto should be named myForm but it isn't", formDto.getJson().contains("myForm"));
assertTrue("formDto should contain a parameter called myParam1 but it doesn't", formDto.getJson().contains("myParam1"));
assertTrue("formDto should contain a parameter called myParam2 but it doesn't", formDto.getJson().contains("myParam2"));
assertTrue("formDto should contain a parameter called myParam3 but it doesn't", formDto.getJson().contains("myParam3"));
}