@Test(expected = InvalidArgumentException.class)
public void testUpdateOriginNameExisting() throws Exception {

  OriginEntity existingOrigin = new OriginEntity()
          .setId(UUID.randomUUID());
  OriginEntity otherOrigin = new OriginEntity()
          .setId(UUID.randomUUID())
          .setName("otherOrigin");
  when(originResolver.apply(existingOrigin.getId())).thenReturn(existingOrigin);
  when(originManager.getOrigin(otherOrigin.getName())).thenReturn(otherOrigin);
  delegate.handle(new UpdateOriginRequest()
          .setId(existingOrigin.getId())
          .setName(otherOrigin.getName())
  );
}