Added JUnit tests to REST API