### Question:
EvoSQLRunner implements QueryRunner { @Override public Result runQuery(@NonNull String sqlQuery, @NonNull ConnectionData connectionData) { EvoSQL evoSQL = evoSQLFactory.createEvoSQL(connectionData); nl.tudelft.serg.evosql.Result evoSQLResult = evoSQL.execute(sqlQuery); return convertResult(evoSQLResult); }  @Override Result runQuery(@NonNull String sqlQuery, @NonNull ConnectionData connectionData);  }### Answer:
@Test void testRunQueryFail() { assertThatNullPointerException().isThrownBy(() -> { new EvoSQLRunner().runQuery(null, Mockito.mock(ConnectionData.class)); }); assertThatNullPointerException().isThrownBy(() -> { new EvoSQLRunner().runQuery("Select * From all", null); }); }
@Test void runQueryTest() { EvoSQL evoSQL = Mockito.mock(EvoSQL.class); EvoSQLFactory evoSQLFactory = Mockito.mock(EvoSQLFactory.class); Mockito.when(evoSQLFactory.createEvoSQL(Mockito.any())).thenReturn(evoSQL); Result result = new Result("Select * From all;", 0); Mockito.when(evoSQL.execute(Mockito.anyString())).thenReturn(result); ConnectionData connectionData = new ConnectionData("cs", "db", "user", "pass"); EvoSQLRunner evoSQLRunner = new EvoSQLRunner(); evoSQLRunner.setEvoSQLFactory(evoSQLFactory); evoSQLRunner.runQuery("Select * From all;", connectionData); Mockito.verify(evoSQLFactory, Mockito.times(1)).createEvoSQL(connectionData); Mockito.verify(evoSQL, Mockito.times(1)).execute("Select * From all;"); }