public function deserialize($document)
    {
        $goalStateInfo = Utilities::unserialize($document);

        return new GoalState(
            $goalStateInfo['Incarnation'],
            $goalStateInfo['ExpectedState'],
            $goalStateInfo['RoleEnvironmentPath'],
            new \DateTime($goalStateInfo['Deadline']),
            $goalStateInfo['CurrentStateEndpoint']
        );
    }