Criteria criteria = givenCriteria();
when(criteria.list()).thenReturn(Arrays.asList(authorizedEntity, unauthorizedEntity));
CrysonRepository crysonRepository = givenCrysonRepositoryWithCriteriaAndEntities(criteria, authorizedEntity, unauthorizedEntity);
List expectedResult = Arrays.asList(authorizedEntity, new UnauthorizedEntity("CrysonTestEntity", 2L));
assertThat(crysonRepository.findByIds(CrysonTestEntity.class.getName(), Arrays.asList(1L, 2L), new HashSet<String>()), is(expectedResult));
}