using mockito instead of mocking by hand