### Question:
UserDataSource { public Observable<List<RepositoryInfo>> listStarredRepo(String user, int page) { return listStarredRepo(user, SortType_Repo.CREATED, page); } UserDataSource(GithubAuthRetrofit authRetrofit, UserService userApi, Context ctx); Observable<UserInfo> getUserInfo(String user); Observable<Boolean> login(final String userName, String password); Observable<List<UserEntity>> listFollowers(String userName, int page); Observable<List<UserEntity>> listFollowing(String user, int page); Observable<List<RepositoryInfo>> listStarredRepo(String user, int page); Observable<List<RepositoryInfo>> listStarredRepo(String user, SortType_Repo sort, int page); Observable<List<RepositoryInfo>> listWatchingRepo(String user, int page); Observable<List<RepositoryInfo>> listOwnRepo(String user, int page); Observable<List<Event>> listNews(String user, int page); Observable<SearchResult<UserEntity>> search(String keyWord, String language, SortType_User sort, int page); Observable<Boolean> signOut(); String getLoginUserName(); Observable<Boolean> toFollow(String user); Observable<Boolean> toUnFollow(String user); Observable<Boolean> checkIfFollowing(String user);  }### Answer:
@Test public void listStarredRepo() throws Exception { TestSubscriber<List<RepositoryInfo>> subscriber = TestSubscriber.create(); userDataSource.listStarredRepo("TellH", 1).subscribe(subscriber); List<List<RepositoryInfo>> onNextEvents = subscriber.getOnNextEvents(); assertNotNull(onNextEvents); System.out.println(onNextEvents.toString()); }
@Test public void listStarredRepo1() throws Exception { TestSubscriber<List<RepositoryInfo>> subscriber = TestSubscriber.create(); userDataSource.listStarredRepo("TellH", Constant.SortType.SortType_Repo.STARS, 1).subscribe(subscriber); List<List<RepositoryInfo>> onNextEvents = subscriber.getOnNextEvents(); assertNotNull(onNextEvents); System.out.println(onNextEvents.toString()); List<RepositoryInfo> list = onNextEvents.get(0); for (int i = 1; i < list.size(); i++) { assertTrue(list.get(i).getStars() < list.get(i - 1).getStars()); } }