@Test
public void shouldReturnListOfEntriesWithGivenIdsInSameOrderAsIds() {

    // given
    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();
    // when
    List<ParameterEntry> entries = parameterEntryDAO.getParameterEntries(runner, ids);
    runner.close();
    // then
    assertThat(entries).hasSize(5).isSortedAccordingTo(new ParameterEntryIdSequenceComparator(ids));
}