@Test
public void testUpdateObjectType() throws Exception {

  UpdateObjectTypeRequest request = createRequest();
  ObjectTypeEntity entity = new ObjectTypeEntity();
  when(objectTypeRequestResolver.fetchExistingObjectType(request.getId())).thenReturn(entity);
  when(objectManager.saveObjectType(argThat(e -> {
    assertSame(entity, e);
    assertEquals(request.getName(), e.getName());
    return true;
  }))).thenReturn(entity);
  delegate.handle(request);
  verify(objectTypeResponseConverter).apply(entity);
}