Added mockito for testing and implemented a few tests