Moved JUnit dependency to parent POM. Added tests for JavaMonitorRegister.