added Mockito dependency and improved tests