### Question:
UserRepository { public void setIsBlocked(int userId, boolean isBlocked) { backgroundHandler.post(() -> { userDao.setBlocked(userId, isBlocked); }); } UserRepository(UserDao userDao, RequestEncoder encoder,
                          Handler backgroundHandler); LiveData<User> getUserLiveData(int userID); User getUser(String username); User getUser(int id); LiveData<PagedList<User>> getFriends(); LiveData<PagedList<User>> getFriendsAndPending(); LiveData<PagedList<User>> getAll(); LiveData<List<User>> getFriendsAsList(); LiveData<List<User>> getCurrentlySharing(); void updateSharing(); void setIsBlocked(int userId, boolean isBlocked); void setIsFriend(int userId, boolean isFriend); void setIsPending(int userId, boolean isPending); void setIsRequesting(int userId, boolean isRequesting); void setUserName(int userId, String username); void addUser(User user); void resetAllUsers(); void updateUser(User user); void requestAddUser(String username); void requestIsBlocked(int userId, boolean isBlocked); void requestAccept(int userId); void requestDecline(int userId); void requestCancel(int userId); void requestRefresh(); void deleteAllUsers();  }### Answer:
@Test public void blockUserTest() { testUserRepository.setIsBlocked(mockUser.getUserId(), true); testUserRepository.setIsBlocked(mockUser.getUserId(), false); verify(mockUserDao).setBlocked(mockUser.getUserId(), true); verify(mockUserDao).setBlocked(mockUser.getUserId(), false); }