public function testTestCreateForCouldNotHydrateObjectWithProperty()
{
$object = new SimpleObject('dummy', new \stdClass());
$property = new Property('foo', 'bar');
$exception = HydrationExceptionFactory::createForCouldNotHydrateObjectWithProperty($object, $property);
$this->assertEquals('Could not hydrate the property "foo" of the object "dummy" (class: stdClass).', $exception->getMessage());
$this->assertEquals(0, $exception->getCode());
$this->assertNull($exception->getPrevious());
$code = 500;
$previous = new \Error();
$exception = HydrationExceptionFactory::createForCouldNotHydrateObjectWithProperty($object, $property, $code, $previous);
$this->assertEquals('Could not hydrate the property "foo" of the object "dummy" (class: stdClass).', $exception->getMessage());
$this->assertEquals($code, $exception->getCode());
$this->assertSame($previous, $exception->getPrevious());
}