@Test public void addGroupTest() { testUserGroupRepository.addGroup(mockGroup); verify(mockUserGroupDao).save(mockGroup); }
public void addGroup(UserGroup group) { backgroundHandler.post(() -> { userGroupDao.save(group); }); }
UserGroupRepository { public void addGroup(UserGroup group) { backgroundHandler.post(() -> { userGroupDao.save(group); }); } }
UserGroupRepository { public void addGroup(UserGroup group) { backgroundHandler.post(() -> { userGroupDao.save(group); }); } UserGroupRepository(UserGroupDao userGroupDao,
                               UserDao userDao,
                               EventDao eventDao,
                               ChatDao chatDao,
                               RequestEncoder encoder,
                               Handler backgroundHandler); }
UserGroupRepository { public void addGroup(UserGroup group) { backgroundHandler.post(() -> { userGroupDao.save(group); }); } UserGroupRepository(UserGroupDao userGroupDao,
                               UserDao userDao,
                               EventDao eventDao,
                               ChatDao chatDao,
                               RequestEncoder encoder,
                               Handler backgroundHandler); LiveData<UserGroup> getGroupLiveData(int id); UserGroup getGroup(int id); LiveData<PagedList<UserGroup>> getGroups(); LiveData<List<UserGroup>> getGroupsInList(); LiveData<List<User>> getGroupMembers(int groupId); void setIsSharing(int groupId, boolean isSharing); void addGroup(UserGroup group); void leaveGroup(UserGroup group); void removeGroup(UserGroup group); void addGroupMembers(int groupId, int[] members); void removeGroupMembers(int groupId, int[] members); void updateGroupMembers(int groupId, int[] newMembers); void updateGroup(UserGroup userGroup); void updateMembership(GroupMembership membership); void requestAddGroup(String groupName, int... members); void requestAddMembersToGroup(int groupId, int... members); void requestKickMembers(int groupId, int... members); void requestNameChange(int groupId, String newName); void requestRefresh(); void deleteAllGroups(); void deleteAllMemberships(); }
UserGroupRepository { public void addGroup(UserGroup group) { backgroundHandler.post(() -> { userGroupDao.save(group); }); } UserGroupRepository(UserGroupDao userGroupDao,
                               UserDao userDao,
                               EventDao eventDao,
                               ChatDao chatDao,
                               RequestEncoder encoder,
                               Handler backgroundHandler); LiveData<UserGroup> getGroupLiveData(int id); UserGroup getGroup(int id); LiveData<PagedList<UserGroup>> getGroups(); LiveData<List<UserGroup>> getGroupsInList(); LiveData<List<User>> getGroupMembers(int groupId); void setIsSharing(int groupId, boolean isSharing); void addGroup(UserGroup group); void leaveGroup(UserGroup group); void removeGroup(UserGroup group); void addGroupMembers(int groupId, int[] members); void removeGroupMembers(int groupId, int[] members); void updateGroupMembers(int groupId, int[] newMembers); void updateGroup(UserGroup userGroup); void updateMembership(GroupMembership membership); void requestAddGroup(String groupName, int... members); void requestAddMembersToGroup(int groupId, int... members); void requestKickMembers(int groupId, int... members); void requestNameChange(int groupId, String newName); void requestRefresh(); void deleteAllGroups(); void deleteAllMemberships();  }