Code a sample view which uses permissions derived from BaseProblemPermission class and throws a registered exception. Write tests with this view to test the following behaviors:
- When the permission passes, content type is "application/json".
- When the permission fails, content type is "application/problem+json" and the problem code is the same as the one declared in the registered exception with the permission.