### Question:
ParameterEntryDAO { public Set<ParameterEntry> getParameterEntries(QueryRunner queryRunner, String parameterName) { return queryRunner.querySet(createSelectQuery(parameterName), new ParameterEntryMapper(configuration)); } ParameterEntryDAO(DefaultJdbcConfig configuration); long insert(QueryRunner queryRunner, ParameterEntry parameterEntry, long parameterId); List<Long> insert(QueryRunner queryRunner, Iterable<ParameterEntry> parameterEntries, long parameterId); Set<ParameterEntry> getParameterEntries(QueryRunner queryRunner, String parameterName); List<ParameterEntry> getParameterEntries(QueryRunner queryRunner, List<Long> ids); Set<JdbcParameterEntry> getJdbcParameterEntries(QueryRunner queryRunner, String parameterName); List<ParameterEntry> getParameterEntriesBatch(QueryRunner queryRunner, String parameterName, long lastEntryId, int batchSize); void deleteParameterEntries(QueryRunner queryRunner, String parameterName); void delete(QueryRunner queryRunner, long entryId); void delete(QueryRunner queryRunner, Iterable<Long> entriesIds); void update(QueryRunner queryRunner, long entryId, ParameterEntry entry); List<ParameterEntry> list(QueryRunner queryRunner, JdbcParameter parameter, ParameterEntriesFilter filters);  }### Answer:
@Test public void shouldReturnListOfEntriesWithGivenIdsInSameOrderAsIds() { List<Long> ids = new ArrayList<Long>(); database().withParameter("parameter").withParameterEntries("parameter", 5, ids).build(); Collections.shuffle(ids); ParameterEntryDAO parameterEntryDAO = get(ParameterEntryDAO.class); QueryRunner runner = queryRunner(); List<ParameterEntry> entries = parameterEntryDAO.getParameterEntries(runner, ids); runner.close(); assertThat(entries).hasSize(5).isSortedAccordingTo(new ParameterEntryIdSequenceComparator(ids)); }