AssetManager extends ComponentSupport { @VisibleForTesting public Duration getLastDownloadedInterval() { return toJodaDuration(globalSettings.getLastDownloadedInterval()); } @Inject  AssetManager(final GlobalRepositorySettings globalSettings); void setLastDownloadedInterval(final Duration lastDownloadedInterval); @VisibleForTesting Duration getLastDownloadedInterval(); boolean maybeUpdateLastDownloaded(final Asset asset); static final Duration DEFAULT_LAST_DOWNLOADED_INTERVAL; }
@Test public void lastDownloadedIntervalDefaultsToTwelveHours() { assertThat(underTest.getLastDownloadedInterval().getStandardSeconds(), is(hours(12).toSeconds())); }