@Test public void updateMetadata() { TestObserver<StorageMetadata> storageTestObserver = RxFirebaseStorage.updateMetadata(mockStorageRef, metadata) .test(); testOnSuccessListener.getValue().onSuccess(metadata); verify(mockStorageRef).updateMetadata(metadata); storageTestObserver.assertNoErrors() .assertValueCount(1) .assertValueSet(Collections.singletonList(metadata)) .assertComplete() .dispose(); }
@NonNull public static Maybe<StorageMetadata> updateMetadata(@NonNull final StorageReference storageRef, @NonNull final StorageMetadata metadata) { return Maybe.create(new MaybeOnSubscribe<StorageMetadata>() { @Override public void subscribe(MaybeEmitter<StorageMetadata> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.updateMetadata(metadata)); } }); }
RxFirebaseStorage { @NonNull public static Maybe<StorageMetadata> updateMetadata(@NonNull final StorageReference storageRef, @NonNull final StorageMetadata metadata) { return Maybe.create(new MaybeOnSubscribe<StorageMetadata>() { @Override public void subscribe(MaybeEmitter<StorageMetadata> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.updateMetadata(metadata)); } }); } }
RxFirebaseStorage { @NonNull public static Maybe<StorageMetadata> updateMetadata(@NonNull final StorageReference storageRef, @NonNull final StorageMetadata metadata) { return Maybe.create(new MaybeOnSubscribe<StorageMetadata>() { @Override public void subscribe(MaybeEmitter<StorageMetadata> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.updateMetadata(metadata)); } }); }  }
RxFirebaseStorage { @NonNull public static Maybe<StorageMetadata> updateMetadata(@NonNull final StorageReference storageRef, @NonNull final StorageMetadata metadata) { return Maybe.create(new MaybeOnSubscribe<StorageMetadata>() { @Override public void subscribe(MaybeEmitter<StorageMetadata> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.updateMetadata(metadata)); } }); }  @NonNull static Maybe<byte[]> getBytes(@NonNull final StorageReference storageRef,
                                         final long maxDownloadSizeBytes); @NonNull static Maybe<Uri> getDownloadUrl(@NonNull final StorageReference storageRef); @NonNull static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull final StorageReference storageRef,
                                                                @NonNull final File destinationFile); @NonNull static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull final StorageReference storageRef,
                                                                @NonNull final Uri destinationUri); @NonNull static Maybe<StorageMetadata> getMetadata(@NonNull final StorageReference storageRef); @NonNull static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull final StorageReference storageRef); @NonNull static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull final StorageReference storageRef,
                                                                    @NonNull final StreamDownloadTask.StreamProcessor processor); @NonNull static Single<UploadTask.TaskSnapshot> putBytes(@NonNull final StorageReference storageRef,
                                                           @NonNull final byte[] bytes); @NonNull static Single<UploadTask.TaskSnapshot> putBytes(@NonNull final StorageReference storageRef,
                                                           @NonNull final byte[] bytes,
                                                           @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri,
                                                          @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri,
                                                          @NonNull final StorageMetadata metadata,
                                                          @NonNull final Uri existingUploadUri); @NonNull static Single<UploadTask.TaskSnapshot> putStream(@NonNull final StorageReference storageRef,
                                                            @NonNull final InputStream stream,
                                                            @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putStream(@NonNull final StorageReference storageRef,
                                                            @NonNull final InputStream stream); @NonNull static Maybe<StorageMetadata> updateMetadata(@NonNull final StorageReference storageRef,
                                                        @NonNull final StorageMetadata metadata); @NonNull static Completable delete(@NonNull final StorageReference storageRef); }
RxFirebaseStorage { @NonNull public static Maybe<StorageMetadata> updateMetadata(@NonNull final StorageReference storageRef, @NonNull final StorageMetadata metadata) { return Maybe.create(new MaybeOnSubscribe<StorageMetadata>() { @Override public void subscribe(MaybeEmitter<StorageMetadata> emitter) throws Exception { RxHandler.assignOnTask(emitter, storageRef.updateMetadata(metadata)); } }); }  @NonNull static Maybe<byte[]> getBytes(@NonNull final StorageReference storageRef,
                                         final long maxDownloadSizeBytes); @NonNull static Maybe<Uri> getDownloadUrl(@NonNull final StorageReference storageRef); @NonNull static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull final StorageReference storageRef,
                                                                @NonNull final File destinationFile); @NonNull static Single<FileDownloadTask.TaskSnapshot> getFile(@NonNull final StorageReference storageRef,
                                                                @NonNull final Uri destinationUri); @NonNull static Maybe<StorageMetadata> getMetadata(@NonNull final StorageReference storageRef); @NonNull static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull final StorageReference storageRef); @NonNull static Single<StreamDownloadTask.TaskSnapshot> getStream(@NonNull final StorageReference storageRef,
                                                                    @NonNull final StreamDownloadTask.StreamProcessor processor); @NonNull static Single<UploadTask.TaskSnapshot> putBytes(@NonNull final StorageReference storageRef,
                                                           @NonNull final byte[] bytes); @NonNull static Single<UploadTask.TaskSnapshot> putBytes(@NonNull final StorageReference storageRef,
                                                           @NonNull final byte[] bytes,
                                                           @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri,
                                                          @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putFile(@NonNull final StorageReference storageRef,
                                                          @NonNull final Uri uri,
                                                          @NonNull final StorageMetadata metadata,
                                                          @NonNull final Uri existingUploadUri); @NonNull static Single<UploadTask.TaskSnapshot> putStream(@NonNull final StorageReference storageRef,
                                                            @NonNull final InputStream stream,
                                                            @NonNull final StorageMetadata metadata); @NonNull static Single<UploadTask.TaskSnapshot> putStream(@NonNull final StorageReference storageRef,
                                                            @NonNull final InputStream stream); @NonNull static Maybe<StorageMetadata> updateMetadata(@NonNull final StorageReference storageRef,
                                                        @NonNull final StorageMetadata metadata); @NonNull static Completable delete(@NonNull final StorageReference storageRef);  }