Changed to use JUnit and EasyMock. Added tests.