//test happy path for GuvnorFormDefinitionService.getForm(...)
public void testGetFormOK() throws Exception {
HttpClient client = EasyMock.createMock(HttpClient.class);
Map<String, String> responses = new HashMap<String, String>();
FormRepresentation form = RESTAbstractTest.createMockForm("form1", "oneParam");
String jsonForm = FormEncodingFactory.getEncoder().encode(form);
responses.put("GET " + helper.getApiSearchUrl("somePackage") + "form1AutoForm.formdef", jsonForm);
EasyMock.expect(client.executeMethod(EasyMock.anyObject(MockGetMethod.class))).
andAnswer(new MockAnswer(responses, new IllegalArgumentException("Unexpected call"))).anyTimes();
GuvnorFormDefinitionService service = createService(baseUrl, "", "");
service.getHelper().setClient(client);
EasyMock.replay(client);
FormRepresentation form1 = service.getForm("somePackage", "form1AutoForm");
EasyMock.verify(client);
assertNotNull("form1 shouldn't be null", form1);
assertEquals("form and form1 should be identical", form, form1);
}