protected function validateEntity($entity, $method)
    {
        if (!$this->isEntity($entity)) {
            throw new Exception\InvalidArgumentException(
                sprintf(
                    '%s expects parameter 1 to be a valid entity instance, %s provided instead', $method,
                    is_object($entity) ? get_class($entity) : gettype($entity)
                )
            );
        }
    }