@Test void testProvideUsersDao() { var factory = mock(UsersDaoFactory.class); var usersDao = mock(UsersDao.class); when(factory.createUsersDao(any(ObjectMapper.class))).thenReturn(usersDao); DaoModule module = new DaoModule(factory); assertEquals(usersDao, module.provideUsersDao(new ObjectMapper())); }
@Singleton @Provides UsersDao provideUsersDao(ObjectMapper mapper) { return usersDaoFactory.createUsersDao(mapper); }
DaoModule { @Singleton @Provides UsersDao provideUsersDao(ObjectMapper mapper) { return usersDaoFactory.createUsersDao(mapper); } }
DaoModule { @Singleton @Provides UsersDao provideUsersDao(ObjectMapper mapper) { return usersDaoFactory.createUsersDao(mapper); } DaoModule(UsersDaoFactory usersDaoFactory); }
DaoModule { @Singleton @Provides UsersDao provideUsersDao(ObjectMapper mapper) { return usersDaoFactory.createUsersDao(mapper); } DaoModule(UsersDaoFactory usersDaoFactory);  }
DaoModule { @Singleton @Provides UsersDao provideUsersDao(ObjectMapper mapper) { return usersDaoFactory.createUsersDao(mapper); } DaoModule(UsersDaoFactory usersDaoFactory);   }