@Test
public void testSearchOriginFiltersNonAccessibleOrigins() throws Exception {

  when(securityContext.hasReadPermission(isA(OriginEntity.class))).thenReturn(false);
  ResultSet<Origin> result = delegate.handle(new SearchOriginRequest());
  assertEquals(0, result.getCount());
  assertEquals(0, ListUtils.list(result.iterator()).size());
  verify(securityContext, times(2)).hasReadPermission(isA(OriginEntity.class));
  verify(originResponseConverter, never()).apply(any());
}