private function getResource()
    {
        $resource = $this->resourceListing->getResource($this->context->getPath(), $this->context->getVersion());

        if (!$resource instanceof Resource) {
            throw new StatusCode\InternalServerErrorException('Resource is not available');
        }

        return $resource;
    }