function it_make_new_snapshots_of_registered_objects()
    {
        $object = new EntityFake(1, "Norbert", "Orzechowicz");
        $proxy = new ProxyFake($object);
        $this->register($proxy);
        $object->changeFirstName("Dawid");
        $object->changeLastName("Sajdak");

        $this->makeNewSnapshots();

        $snapshot = $this->getSnapshot($proxy);
        $snapshot->getFirstName()->shouldReturn("Dawid");
        $snapshot->getLastName()->shouldReturn("Sajdak");
    }
    public static function buildDefinition()
    {
        $definition = new Definition(
            new ClassName(EntityFake::getClassName()),
            new Definition\Identity("id")
        );

        $definition->setObserved([
            new Definition\Property("firstName"),
            new Definition\Property("lastName")
        ]);

        return $definition;
    }
    /**
     * @return Definition
     */
    public function createDefinition()
    {
        $definition = new Definition(
            new ClassName(EntityFake::getClassName()),
            [
                new LazyProperty(
                    new Name("items"),
                    new InitializerStub($this->itemsInitializerValue),
                    [new Method('getItems')]
                )
            ]
        );

        return $definition;
    }
    public static function buildDefinition($itemsInitializationResult = null)
    {
        $definition = new Definition(
            new ClassName(EntityFake::getClassName()),
            [
                new LazyProperty(
                    new Name("items"),
                    new InitializerStub($itemsInitializationResult),
                    [new Method('getItems')]
                )
            ]
        );

        return $definition;
    }