@Test
public void testResolveOriginNonProvidedFetchesExistingOrigin() throws Exception {

  UUID currentUserID = UUID.randomUUID();
  OriginEntity origin = new OriginEntity().setId(currentUserID);
  when(securityContext.getCurrentUserID()).thenReturn(currentUserID);
  when(originManager.getOrigin(currentUserID)).thenReturn(origin);
  assertSame(origin, handler.resolveOrigin(null));
  verify(originManager).getOrigin(currentUserID);
  verifyNoMoreInteractions(originManager);
}