@Test public void staleTest() { when(fileSystem.getRecordState(TimeUnit.DAYS, 1L, SourcePersister.pathForBarcode(simple))) .thenReturn(RecordState.STALE); assertThat(sourcePersister.getRecordState(simple)).isEqualTo(RecordState.STALE); }
@Nonnull @Override public RecordState getRecordState(@Nonnull BarCode barCode) { return sourceFileReader.getRecordState(barCode, expirationUnit, expirationDuration); }
RecordPersister extends SourcePersister implements RecordProvider<BarCode> { @Nonnull @Override public RecordState getRecordState(@Nonnull BarCode barCode) { return sourceFileReader.getRecordState(barCode, expirationUnit, expirationDuration); } }
RecordPersister extends SourcePersister implements RecordProvider<BarCode> { @Nonnull @Override public RecordState getRecordState(@Nonnull BarCode barCode) { return sourceFileReader.getRecordState(barCode, expirationUnit, expirationDuration); } @Inject  RecordPersister(FileSystem fileSystem,
                           long expirationDuration,
                           @Nonnull TimeUnit expirationUnit); }
RecordPersister extends SourcePersister implements RecordProvider<BarCode> { @Nonnull @Override public RecordState getRecordState(@Nonnull BarCode barCode) { return sourceFileReader.getRecordState(barCode, expirationUnit, expirationDuration); } @Inject  RecordPersister(FileSystem fileSystem,
                           long expirationDuration,
                           @Nonnull TimeUnit expirationUnit); static RecordPersister create(FileSystem fileSystem,
                                         long expirationDuration,
                                         @Nonnull TimeUnit expirationUnit); @Nonnull @Override RecordState getRecordState(@Nonnull BarCode barCode); }
RecordPersister extends SourcePersister implements RecordProvider<BarCode> { @Nonnull @Override public RecordState getRecordState(@Nonnull BarCode barCode) { return sourceFileReader.getRecordState(barCode, expirationUnit, expirationDuration); } @Inject  RecordPersister(FileSystem fileSystem,
                           long expirationDuration,
                           @Nonnull TimeUnit expirationUnit); static RecordPersister create(FileSystem fileSystem,
                                         long expirationDuration,
                                         @Nonnull TimeUnit expirationUnit); @Nonnull @Override RecordState getRecordState(@Nonnull BarCode barCode);  }