### Question:
QueryProcess implements ConnectorProcess { @TimerJ public void run() { try { ConnectorQueryData queryData = queryParser.transformLogicalWorkFlow(project, queryId); String query = queryBuilder.createQuery(queryData); if (logger.isDebugEnabled()) { logger.debug("The decision query is: [" + query + "]"); } queryExecutor = new ConnectorQueryExecutor(queryData, resultHandler); queryExecutor.executeQuery(query, connection); } catch (ExecutionException e) { String msg = "Decision query execution fail." + e.getMessage(); logger.error(msg); resultHandler.processException(queryId, new ExecutionException(msg, e)); } catch (InterruptedException e) { logger.info("The query is stopped"); } catch (UnsupportedException e) { logger.error(e.getMessage()); resultHandler.processException(queryId, new ExecutionException(e)); } } QueryProcess(String queryId, Project project, IResultHandler resultHandler,
                    Connection<IStratioStreamingAPI> connection); @TimerJ void run(); @Override void endQuery(); @Override Project getProject();  }### Answer:
@Test public void runTest() throws Exception { ConnectorQueryData connectorQueryData = mock(ConnectorQueryData.class); when(queryParser.transformLogicalWorkFlow(PROJECT, QUERY_ID)).thenReturn(connectorQueryData); when(queryBuilder.createQuery(connectorQueryData)).thenReturn(QUERY); PowerMockito.whenNew(ConnectorQueryExecutor.class).withArguments(connectorQueryData, RESULT_HANDLER) .thenReturn(connectorQueryExecutor); queryProcess.run(); verify(connectorQueryExecutor, times(1)).executeQuery(QUERY, CONNECTION); }