SimpleJdbcRepository implements JdbcRepository { @Override public Set<String> listParameterNames() { return parameterDAO.getParameterNames(); } SimpleJdbcRepository(JdbcConfig configuration, ParameterDAO parameterDAO, LevelDAO levelDAO, ParameterEntryDAO parameterEntryDAO); @Override long createParameter(QueryRunner runner, Parameter parameter); @Override boolean parameterExists(QueryRunner runner, String parameterName); @Override JdbcParameter getParameter(QueryRunner runner, String parameterName); @Override JdbcParameter getParameterMetadata(QueryRunner runner, String parameterName); @Override Set<String> listParameterNames(); @Override List<String> listParameterNames(ParameterFilter filter); @Override Set<ParameterEntry> getParameterEntries(QueryRunner runner, String parameterName); @Override List<Long> writeParameterEntries(QueryRunner runner, String parameterName, Iterable<ParameterEntry> entries); @Override void deleteParameter(QueryRunner runner, String parameterName); @Override void updateParameter(QueryRunner runner, String parameterName, Parameter parameter); @Override long addLevel(QueryRunner runner, String parameterName, Level level); @Override void updateLevel(QueryRunner runner, long levelId, Level level); @Override void reorderLevels(QueryRunner runner, long[] orderedLevelIds); @Override void deleteLevel(QueryRunner queryRunner, String parameterName, long levelId); @Override List<ParameterEntry> getEntries(QueryRunner runner, List<Long> ids); @Override List<ParameterEntry> listEntries(QueryRunner runner, String parameterName, ParameterEntriesFilter filter); @Override long addParameterEntry(QueryRunner runner, String parameterName, ParameterEntry entry); @Override void updateParameterEntry(QueryRunner runner, long entryId, ParameterEntry entry); @Override void deleteParameterEntry(QueryRunner runner, long entryId); @Override void deleteParameterEntries(QueryRunner runner, Iterable<Long> entriesIds); @Override void deleteParameterEntries(QueryRunner runner, String parameterName);  }
@Test public void shouldReturnSetOfParameterNames() { database().withParameter("test1").withParameter("test2").build(); SimpleJdbcRepository repository = get(SimpleJdbcRepository.class); Set<String> parameters = repository.listParameterNames(); assertThat(parameters).hasSize(2); }