@Test
public void testResolveOriginProvidedFetchesExistingOriginById() throws Exception {

  UUID originID = UUID.randomUUID();
  OriginEntity origin = new OriginEntity().setId(originID);
  when(originManager.getOrigin(originID)).thenReturn(origin);
  assertSame(origin, handler.resolveOrigin(originID.toString()));
  verify(originManager).getOrigin(originID);
  verify(securityContext).checkReadPermission(origin);
  verifyNoMoreInteractions(originManager);
}