public function newEntity($data = null, array $options = [])
    {
        if ($data === null) {
            $class = $this->getResourceClass();
            $entity = new $class([], ['source' => $this->getRegistryAlias()]);

            return $entity;
        }
        $marshaller = $this->marshaller();

        return $marshaller->one($data, $options);
    }