add JUnit test for Monitor