protected function validateModelClass($modelClass)
    {
        // Validate the expected model exists.
        if (!class_exists($modelClass)) {
            throw new CrudModelException('The related model does not exist.');
        }

        // Validate the model extends the correct base model.
        if (!is_subclass_of($modelClass, self::MICROSERVICE_BASE_MODEL_CLASS)) {
            throw new CrudModelException('The related model must extend the MicroServiceBaseModel abstract class.');
        }

        // Validate the model implements the correct interface.
        if (!in_array(self::MICROSERVICE_CRUD_MODEL_INTERFACE, class_implements($modelClass))) {
            throw new CrudModelException('The related model must implement CrudModelInterface.');
        }
    }