@Test
public void testTraverseGraphByObjectTypeValueWithoutObject() throws Exception {

  TraverseByObjectTypeValueRequest request = new TraverseByObjectTypeValueRequest().setType("type").setValue("value");
  when(objectManager.getObjectType(request.getType())).thenReturn(new ObjectTypeEntity());
  doThrow(AccessDeniedException.class).when(securityContext).checkReadPermission((ObjectRecord) isNull());
  try {
    delegate.handle(request);
    fail();
  } catch (AccessDeniedException ignored) {
    verify(objectTypeHandler).assertObjectTypeExists(request.getType(), "type");
    verify(objectFactDao).getObject(request.getType(), request.getValue());
  }
}