public function canInvokeACallbackAfterObjectConstruction()
{
$this->factory->defineEntity('SpaceShip', array('name' => 'Foo'), array('afterCreate' => function (TestEntity\SpaceShip $ss, array $fieldValues) {
$ss->setName($ss->getName() . '-' . $fieldValues['name']);
}));
$ss = $this->factory->get('SpaceShip');
$this->assertEquals("Foo-Foo", $ss->getName());
}