@Test public void testDelete(TestContext context) throws IOException { Async async = context.async(); SharedFileSystem fileSystem = Mockito.mock(SharedFileSystem.class); FileMetadataRegistry fileMetadataRegistry = Mockito.mock(FileMetadataRegistry.class); FileTransporter transporter = new FileTransporter(vertx, fileSystem, fileMetadataRegistry); UUID id = UUID.randomUUID(); doReturn(Single.just((Void) null)).when(fileSystem).delete(eq(id)); doReturn(Single.just((Void) null)).when(fileMetadataRegistry).delete(eq(id)); transporter.delete(id).subscribe(v -> { Mockito.verify(fileSystem).delete(eq(id)); Mockito.verify(fileMetadataRegistry).delete(eq(id)); async.complete(); }); }
Single<@FileId UUID> delete(@FileId UUID id) { return observableFileMetadataRegistry.delete(id).flatMap(v -> { return observableFileSystem.delete(id); }); }
FileTransporter { Single<@FileId UUID> delete(@FileId UUID id) { return observableFileMetadataRegistry.delete(id).flatMap(v -> { return observableFileSystem.delete(id); }); } }
FileTransporter { Single<@FileId UUID> delete(@FileId UUID id) { return observableFileMetadataRegistry.delete(id).flatMap(v -> { return observableFileSystem.delete(id); }); }  }
FileTransporter { Single<@FileId UUID> delete(@FileId UUID id) { return observableFileMetadataRegistry.delete(id).flatMap(v -> { return observableFileSystem.delete(id); }); }   }
FileTransporter { Single<@FileId UUID> delete(@FileId UUID id) { return observableFileMetadataRegistry.delete(id).flatMap(v -> { return observableFileSystem.delete(id); }); }    }