public void testAddServiceManagerValidationError_shouldPutErrorMessagesOnPage() throws Exception {
Map<String, String> errorMessages = new HashMap<String, String>();
errorMessages.put("a", "Service Validation Error");
when(factoryMock.getValidationErrors(anyMap())).thenReturn(errorMessages);
tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
FormTester formTester = tester.newFormTester("editor:form");
formTester.setValue("attributesPanel:fields:a:row:field", "someValue");
AjaxButton submitButton =
(AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:submitButton");
tester.executeAjaxEvent(submitButton, "onclick");