Add more JUnit tests, add logging to the testing environment