@Test public void readExists() throws FileNotFoundException { when(fileSystem.exists(simple.toString())) .thenReturn(true); when(fileSystem.read(simple.toString())).thenReturn(bufferedSource); BufferedSource returnedValue = sourcePersister.read(simple).blockingGet(); assertThat(returnedValue).isEqualTo(bufferedSource); }
@Nonnull @Override public Maybe<BufferedSource> read(@Nonnull final BarCode barCode) { return sourceFileReader.read(barCode); }
SourcePersister implements Persister<BufferedSource, BarCode> { @Nonnull @Override public Maybe<BufferedSource> read(@Nonnull final BarCode barCode) { return sourceFileReader.read(barCode); } }
SourcePersister implements Persister<BufferedSource, BarCode> { @Nonnull @Override public Maybe<BufferedSource> read(@Nonnull final BarCode barCode) { return sourceFileReader.read(barCode); } @Inject  SourcePersister(FileSystem fileSystem); }
SourcePersister implements Persister<BufferedSource, BarCode> { @Nonnull @Override public Maybe<BufferedSource> read(@Nonnull final BarCode barCode) { return sourceFileReader.read(barCode); } @Inject  SourcePersister(FileSystem fileSystem); static SourcePersister create(FileSystem fileSystem); @Nonnull @Override Maybe<BufferedSource> read(@Nonnull final BarCode barCode); @Nonnull @Override Single<Boolean> write(@Nonnull final BarCode barCode, @Nonnull final BufferedSource data); }
SourcePersister implements Persister<BufferedSource, BarCode> { @Nonnull @Override public Maybe<BufferedSource> read(@Nonnull final BarCode barCode) { return sourceFileReader.read(barCode); } @Inject  SourcePersister(FileSystem fileSystem); static SourcePersister create(FileSystem fileSystem); @Nonnull @Override Maybe<BufferedSource> read(@Nonnull final BarCode barCode); @Nonnull @Override Single<Boolean> write(@Nonnull final BarCode barCode, @Nonnull final BufferedSource data);  }