Added tests for Group controller and fixed Group entity issue

This PR comes with some tests for the controller classes and small fixes for problems found in testing.