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.
This test fails without a fixed issue in the Git client : https://github.com/devhub-tud/git-server/pull/35