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

  UpdateObjectTypeRequest request = createRequest();
  when(objectManager.getObjectType(request.getId())).thenReturn(new ObjectTypeEntity());
  doThrow(InvalidArgumentException.class).when(objectTypeHandler).assertObjectTypeNotExists(request.getName());
  delegate.handle(request);
}