### Question:
FlowEngineAuditProcessor { public FlowEngineAuditEvent getQueryEvent(String ontology, String query, String queryType, String retVal, String domainName) { String message = "Query message on ontology " + ontology; return getEvent(ontology, query, queryType, null, message, domainName, OperationType.QUERY); }  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_get_query_event() { String query = ""; when(domainService.getFlowDomainById(DOMAIN_ID)).thenReturn(getTestFlowDomain()); when(domainService.getFlowDomainByIdentification(DOMAIN_ID)).thenReturn(getTestFlowDomain()); FlowEngineAuditEvent event = flowEngineAuditProcessor.getQueryEvent(ONTOLOGY_ID, query, QueryType.NATIVE.name(), "", DOMAIN_ID); assertEquals(EventType.FLOWENGINE, event.getType()); Assert.assertNull(event.getData()); assertEquals(ONTOLOGY_ID, event.getOntology()); assertEquals(query, event.getQuery()); assertEquals(Module.FLOWENGINE, event.getModule()); assertEquals(OperationType.QUERY.name(), event.getOperationType()); assertEquals(USER_ID, event.getUser()); }