@Test public void testParseObservableAllNextAfterCompleted() { List<ParseUser> users = mocker(ParseUser.class).when(user -> user.getObjectId()).thenReturn(user -> String.valueOf(user.hashCode())).asList(3); rx.parse2.ParseObservable.all(mocker(ParseQuery.class) .when(query -> query.countInBackground()).thenReturn(query -> Task.forResult(users.size())) .when(query -> query.findInBackground()).thenReturn(query -> Task.forResult(users)) .when(query -> query.setSkip(any(int.class))).thenReturn(query -> null) .when(query -> query.setLimit(any(int.class))).thenReturn(query -> null).mock()) .test() .assertNoErrors() .assertComplete(); }
@NonNull @CheckReturnValue public static <R extends ParseObject> Observable<R> all(@NonNull final ParseQuery<R> query) { return count(query).flatMapObservable(c -> all(query, c)); }
ParseObservable { @NonNull @CheckReturnValue public static <R extends ParseObject> Observable<R> all(@NonNull final ParseQuery<R> query) { return count(query).flatMapObservable(c -> all(query, c)); } }
ParseObservable { @NonNull @CheckReturnValue public static <R extends ParseObject> Observable<R> all(@NonNull final ParseQuery<R> query) { return count(query).flatMapObservable(c -> all(query, c)); }  }
ParseObservable { @NonNull @CheckReturnValue public static <R extends ParseObject> Observable<R> all(@NonNull final ParseQuery<R> query) { return count(query).flatMapObservable(c -> all(query, c)); }  @NonNull @CheckReturnValue static Observable<R> find(@NonNull final ParseQuery<R> query); @NonNull @CheckReturnValue static Single<Integer> count(@NonNull final ParseQuery<R> query); @NonNull static Completable pin(@NonNull final R object); @NonNull static Completable pin(@NonNull final List<R> objects); @NonNull static Completable pin(@NonNull final String name, @NonNull final R object); @NonNull static Completable pin(@NonNull final String name, @NonNull final List<R> objects); @NonNull static Completable unpin(@NonNull final R object); @NonNull static Completable unpin(@NonNull final List<R> objects); @NonNull static Completable unpin(@NonNull final String name, @NonNull final R object); @NonNull static Completable unpin(@NonNull final String name, @NonNull final List<R> objects); @NonNull @CheckReturnValue static Observable<R> all(@NonNull final ParseQuery<R> query); @NonNull @CheckReturnValue static Observable<R> all(@NonNull final ParseQuery<R> query, int count); @NonNull @CheckReturnValue static Single<R> first(@NonNull final ParseQuery<R> query); @NonNull @CheckReturnValue static Single<R> get(@NonNull final Class<R> clazz, @NonNull final String objectId); @NonNull @CheckReturnValue static Single<R> get(@NonNull final ParseQuery<R> query, @NonNull final String objectId); @NonNull @CheckReturnValue static Observable<R> callFunction(@NonNull final String name, @NonNull final Map<String, ?> params); @NonNull static Completable save(@NonNull final R object); @NonNull static Completable save(@NonNull final List<R> objects); @NonNull static Completable saveEventually(@NonNull final R object); @NonNull @CheckReturnValue static Single<R> fetch(@NonNull final R object); @NonNull @CheckReturnValue static Observable<R> fetch(@NonNull final List<R> objects); @NonNull @CheckReturnValue static Single<R> fetchIfNeeded(@NonNull final R object); @NonNull @CheckReturnValue static Observable<R> fetchIfNeeded(@NonNull final List<R> objects); @NonNull static Completable delete(@NonNull final R object); @NonNull static Completable delete(@NonNull final List<R> objects); @NonNull static Completable subscribe(@NonNull final String channel); @NonNull static Completable unsubscribe(@NonNull final String channel); @NonNull static Completable send(@NonNull final ParsePush push); @NonNull static Completable send(@NonNull final JSONObject data, @NonNull final ParseQuery<ParseInstallation> query); @NonNull static Completable send(@NonNull final String message, @NonNull final ParseQuery<ParseInstallation> query); @NonNull @CheckReturnValue static Single<ParseUser> become(@NonNull final String sessionToken); @NonNull @CheckReturnValue static Single<ParseUser> logIn(@NonNull final String username, @NonNull final String password); @NonNull static Completable logOut(); @NonNull @CheckReturnValue static Single<ParseUser> anonymousLogIn(); @NonNull @CheckReturnValue static Single<ParseUser> logInWith(@NonNull final String authType,
                                              @NonNull final Map<String, String> authData); @NonNull static Completable linkWith(@NonNull final ParseUser user,
                                       @NonNull final String authType,
                                       @NonNull final Map<String, String> authData); @NonNull static Completable resetPassword(@NonNull final String email); @NonNull static Completable signUp(@NonNull final ParseUser user); @NonNull static Completable trackAppOpened(@NonNull final Intent intent); @NonNull static Completable trackEvent(@NonNull final String name); @NonNull static Completable trackEvent(@NonNull final String name, @NonNull final Map<String,String> dimensions); @NonNull @CheckReturnValue static Single<byte[]> getData(@NonNull final ParseFile file); @NonNull @CheckReturnValue static Single<byte[]> getData(@NonNull final ParseFile file, @NonNull final ProgressCallback progressCallback); @NonNull @CheckReturnValue static Single<InputStream> getDataStream(@NonNull final ParseFile file); @NonNull @CheckReturnValue static Single<InputStream> getDataStream(@NonNull final ParseFile file, @NonNull final ProgressCallback progressCallback); @NonNull @CheckReturnValue static Single<File> getFile(@NonNull final ParseFile file); @NonNull @CheckReturnValue static Single<File> getFile(@NonNull final ParseFile file, @NonNull final ProgressCallback progressCallback); @NonNull static Completable save(@NonNull final ParseFile file); @NonNull static Completable save(@NonNull final ParseFile file, @NonNull final ProgressCallback uploadProgressCallback); @NonNull @CheckReturnValue static Single<ParseConfig> getConfig(); }
ParseObservable { @NonNull @CheckReturnValue public static <R extends ParseObject> Observable<R> all(@NonNull final ParseQuery<R> query) { return count(query).flatMapObservable(c -> all(query, c)); }  @NonNull @CheckReturnValue static Observable<R> find(@NonNull final ParseQuery<R> query); @NonNull @CheckReturnValue static Single<Integer> count(@NonNull final ParseQuery<R> query); @NonNull static Completable pin(@NonNull final R object); @NonNull static Completable pin(@NonNull final List<R> objects); @NonNull static Completable pin(@NonNull final String name, @NonNull final R object); @NonNull static Completable pin(@NonNull final String name, @NonNull final List<R> objects); @NonNull static Completable unpin(@NonNull final R object); @NonNull static Completable unpin(@NonNull final List<R> objects); @NonNull static Completable unpin(@NonNull final String name, @NonNull final R object); @NonNull static Completable unpin(@NonNull final String name, @NonNull final List<R> objects); @NonNull @CheckReturnValue static Observable<R> all(@NonNull final ParseQuery<R> query); @NonNull @CheckReturnValue static Observable<R> all(@NonNull final ParseQuery<R> query, int count); @NonNull @CheckReturnValue static Single<R> first(@NonNull final ParseQuery<R> query); @NonNull @CheckReturnValue static Single<R> get(@NonNull final Class<R> clazz, @NonNull final String objectId); @NonNull @CheckReturnValue static Single<R> get(@NonNull final ParseQuery<R> query, @NonNull final String objectId); @NonNull @CheckReturnValue static Observable<R> callFunction(@NonNull final String name, @NonNull final Map<String, ?> params); @NonNull static Completable save(@NonNull final R object); @NonNull static Completable save(@NonNull final List<R> objects); @NonNull static Completable saveEventually(@NonNull final R object); @NonNull @CheckReturnValue static Single<R> fetch(@NonNull final R object); @NonNull @CheckReturnValue static Observable<R> fetch(@NonNull final List<R> objects); @NonNull @CheckReturnValue static Single<R> fetchIfNeeded(@NonNull final R object); @NonNull @CheckReturnValue static Observable<R> fetchIfNeeded(@NonNull final List<R> objects); @NonNull static Completable delete(@NonNull final R object); @NonNull static Completable delete(@NonNull final List<R> objects); @NonNull static Completable subscribe(@NonNull final String channel); @NonNull static Completable unsubscribe(@NonNull final String channel); @NonNull static Completable send(@NonNull final ParsePush push); @NonNull static Completable send(@NonNull final JSONObject data, @NonNull final ParseQuery<ParseInstallation> query); @NonNull static Completable send(@NonNull final String message, @NonNull final ParseQuery<ParseInstallation> query); @NonNull @CheckReturnValue static Single<ParseUser> become(@NonNull final String sessionToken); @NonNull @CheckReturnValue static Single<ParseUser> logIn(@NonNull final String username, @NonNull final String password); @NonNull static Completable logOut(); @NonNull @CheckReturnValue static Single<ParseUser> anonymousLogIn(); @NonNull @CheckReturnValue static Single<ParseUser> logInWith(@NonNull final String authType,
                                              @NonNull final Map<String, String> authData); @NonNull static Completable linkWith(@NonNull final ParseUser user,
                                       @NonNull final String authType,
                                       @NonNull final Map<String, String> authData); @NonNull static Completable resetPassword(@NonNull final String email); @NonNull static Completable signUp(@NonNull final ParseUser user); @NonNull static Completable trackAppOpened(@NonNull final Intent intent); @NonNull static Completable trackEvent(@NonNull final String name); @NonNull static Completable trackEvent(@NonNull final String name, @NonNull final Map<String,String> dimensions); @NonNull @CheckReturnValue static Single<byte[]> getData(@NonNull final ParseFile file); @NonNull @CheckReturnValue static Single<byte[]> getData(@NonNull final ParseFile file, @NonNull final ProgressCallback progressCallback); @NonNull @CheckReturnValue static Single<InputStream> getDataStream(@NonNull final ParseFile file); @NonNull @CheckReturnValue static Single<InputStream> getDataStream(@NonNull final ParseFile file, @NonNull final ProgressCallback progressCallback); @NonNull @CheckReturnValue static Single<File> getFile(@NonNull final ParseFile file); @NonNull @CheckReturnValue static Single<File> getFile(@NonNull final ParseFile file, @NonNull final ProgressCallback progressCallback); @NonNull static Completable save(@NonNull final ParseFile file); @NonNull static Completable save(@NonNull final ParseFile file, @NonNull final ProgressCallback uploadProgressCallback); @NonNull @CheckReturnValue static Single<ParseConfig> getConfig();  }