@Test
public void testCreateObjectType() throws Exception {

  CreateObjectTypeRequest request = createRequest();
  ObjectTypeEntity newEntity = new ObjectTypeEntity();
  when(objectManager.saveObjectType(any())).thenReturn(newEntity);
  delegate.handle(request);
  verify(objectTypeResponseConverter).apply(newEntity);
  verify(objectManager).saveObjectType(argThat(entity -> {
    assertNotNull(entity.getId());
    assertNotNull(entity.getNamespaceID());
    assertEquals(request.getName(), entity.getName());
    assertEquals(request.getValidator(), entity.getValidator());
    assertEquals(request.getValidatorParameter(), entity.getValidatorParameter());
    return true;
  }));
}