public void should_restrict_result_size_by_parameters()
{
// given
final String name = "testRestrictResultSizeByParameters";
builder.createSimple(name);
Simple second = builder.createSimple(name);
// when
List<Simple> result = repo.findByNamedQueryRestricted(name, Boolean.TRUE, 1, 1);
// then
assertNotNull(result);
assertEquals(1, result.size());
assertEquals(second.getId(), result.get(0).getId());
}