Changed to JUnit4 and added some tests