@expectedException \Symfony\Component\Validator\Exception\NoSuchMetadataException
public function testValidateCascadedPropertyRequiresObjectOrArray() {
$entity = new Entity();
$entity->reference = 'no object';
$this->metadata
->addPropertyConstraint('reference', new Valid());
$this->visitor
->validate($entity, 'Default', '');
}