added mockito and fix unit test