### Question:
FlowEngineAuditProcessor { public OPAuditError createErrorEvent(String userId, String message, Exception ex) { return OPEventFactory.builder().build().createAuditEventError(userId, message, Module.FLOWENGINE, ex); }  String getUserId(String domainId); String getUserId(FlowEngineDomain domain); FlowEngineAuditEvent getEvent(String methodName, String retVal, FlowEngineDomain domain,
			OperationType operation); FlowEngineAuditEvent getEvent(String methodName, String domainId, OperationType operation); FlowEngineAuditEvent getQueryEvent(String ontology, String query, String queryType, String retVal,
			String domainName); FlowEngineAuditEvent getInsertEvent(String ontology, String data, String retVal, String domainName); FlowEngineAuditEvent getEvent(String ontology, String query, String queryType, String data, String message,
			String domainName, OperationType operation); FlowEngineAuditEvent getEvent(String domain, String user, OperationType operation, String message,
			ResultOperationType result); OPAuditError getErrorEvent(String methodName, FlowEngineDomain domain, Exception ex); OPAuditError getErrorEvent(String message, String domainName, Exception ex); OPAuditError getErrorEvent(String method, String message, String domain, Exception ex); OPAuditError createErrorEvent(String userId, String message, Exception ex);  }### Answer:
@Test public void given_create_error_event() { Exception ex = new Exception(); String message = "dummyMessage"; OPAuditError event = flowEngineAuditProcessor.createErrorEvent(USER_ID, message, ex); assertEquals(EventType.ERROR, event.getType()); Assert.assertNotNull(event.getMessage()); assertEquals(ex.getMessage(), event.getErrorMessage()); assertEquals(Module.FLOWENGINE, event.getModule()); assertEquals(USER_ID, event.getUser()); }