### Question:
DatabaseManager { public final Integer runAggregateQuery(String sql) { Validate.notEmpty(sql, "sql must not be empty"); return runSingleQuery(RowConverters.INTEGER, sql); } protected  DatabaseManager(DataSource dataSource); final boolean entryExists(String sql, List<?> args); final boolean entryExists(String sql, Object... args); final int runBatchInsert(String sql, BatchDataProvider provider); final long runBatchInsertLongId(String sql, BatchDataProvider provider); final int[] runBatchInsertReturnIds(String sql, final List<List<Object>> batchArgs); final long[] runBatchInsertReturnLongIds(String sql, final List<List<Object>> batchArgs); final int[] runBatchUpdate(String sql, BatchDataProvider provider); final int[] runBatchUpdate(String sql, final List<List<Object>> batchArgs); final Integer runAggregateQuery(String sql); final int runInsertReturnId(String sql, List<?> args); final int runInsertReturnId(String sql, Object... args); final int runInsertReturnId(Connection connection, String sql, Object... args); final int runInsertReturnId(Query query); long runInsertReturnLongId(String sql, Object... args); final int runInsertReturnId(Connection connection, Query query); @Deprecated final Object[] runOneResultLineQuery(String query, final int entries, Object... args); final int runQuery(ResultCallback<T> callback, RowConverter<T> converter, String sql, Object... args); final int runQuery(ResultCallback<T> callback, RowConverter<T> converter, Query query); final int runQuery(ResultSetCallback callback, String sql, Object... args); final int runQuery(ResultSetCallback callback, Query query); final List<T> runQuery(RowConverter<T> converter, String sql, List<?> args); final List<T> runQuery(RowConverter<T> converter, String sql, Object... args); final List<T> runQuery(RowConverter<T> converter, Query query); final Set<T> runDistinctQuery(RowConverter<T> converter, String sql, Object... args); final Set<T> runDistinctQuery(RowConverter<T> converter, Query query); final ResultIterator<T> runQueryWithIterator(RowConverter<T> converter, String sql, List<?> args); final ResultIterator<T> runQueryWithIterator(RowConverter<T> converter, String sql, Object... args); final ResultIterator<T> runQueryWithIterator(RowConverter<T> converter, Query query); final T runSingleQuery(RowConverter<T> converter, String sql, List<?> args); final T runSingleQuery(RowConverter<T> converter, String sql, Object... args); @SuppressWarnings("unchecked") final T runSingleQuery(RowConverter<T> converter, Query query); final int runUpdate(String sql, List<?> args); final int runUpdate(String sql, Object... args); final int runUpdate(Connection connection, String sql, List<?> args); final int runUpdate(Connection connection, String sql, Object... args); final int runUpdate(Query query); final int runUpdate(Connection connection, Query query); final int runUpdate(ResultSetCallback callback, String sql); StringBuilder getLastError();  }### Answer:
@Test public void runAggregateQuery() { databaseManager.runInsertReturnId(INSERT_TEST, d1); databaseManager.runInsertReturnId(INSERT_TEST, d2); databaseManager.runInsertReturnId(INSERT_TEST, d3); int aggregateResult = databaseManager.runAggregateQuery(COUNT_TEST); assertEquals(3, aggregateResult); aggregateResult = databaseManager.runAggregateQuery(MAX_TEST); assertEquals(3, aggregateResult); }