public function getIdentifierByObjectReturnsValueOfPropertyTaggedWithId()
{
$object = $this->createMock(ProxyInterface::class);
$object->Persistence_Object_Identifier = 'randomlyGeneratedUuid';
$object->customId = 'customId';
$mockReflectionService = $this->createMock(ReflectionService::class);
$mockReflectionService->expects($this->any())->method('getPropertyNamesByTag')->will($this->returnValue(['customId']));
$session = new Persistence\Generic\Session();
$session->injectReflectionService($mockReflectionService);
$this->assertEquals('customId', $session->getIdentifierByObject($object));
}