public function convertFromShouldThrowExceptionIfPropertyOnTargetObjectCouldNotBeSet()
{
$source = ['propertyX' => 'bar'];
$object = new ClassWithSetters();
$convertedChildProperties = ['propertyNotExisting' => 'bar'];
$this->mockReflectionService->expects($this->once())->method('hasMethod')->with(ClassWithSetters::class, '__construct')->will($this->returnValue(false));
$this->mockObjectManager->expects($this->once())->method('getClassNameByObjectName')->with(ClassWithSetters::class)->will($this->returnValue(ClassWithSetters::class));
$configuration = $this->buildConfiguration([PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED => true]);
$result = $this->converter->convertFrom($source, ClassWithSetters::class, $convertedChildProperties, $configuration);
$this->assertSame($object, $result);
}