Added tests for entities and controllers, fixed some found issues

This PR comes with some tests for the controller classes and small fixes for problems found in testing.
We're already catching this in the places where this is used (`ProjectsResource`), so the `Provider<Courses>` dependency could be removed. (This is now analog to how we check `User` objects here)