@Test
public void shouldLimitNumberOfEntriesReturned() {

    // given
    database().withParameter("parameter").withParameterEntries("parameter", 10).build();
    ParameterEntryDAO parameterEntryDAO = get(ParameterEntryDAO.class);
    QueryRunner runner = queryRunner();
    JdbcParameter parameter = get(ParameterDAO.class).getParameter(runner, "parameter");
    // when
    List<ParameterEntry> entries = parameterEntryDAO.list(runner, parameter, new ParameterEntriesFilter(0, 5));
    runner.close();
    // then
    assertThat(entries).hasSize(5);
}