Added JUnit tests for controller