FileLookup implements LookupStrategy { @Override public Update findLatestUpdate() throws IOException { return new UpdateDescription(findLatestVersion()); } FileLookup(File availableVersions); @Override Update findLatestUpdate();  }
@Test public void returnsLatestUpdate() throws Exception { Update latest = lookup.findLatestUpdate(); assertThat(latest.isUpdateFrom(new NumericVersion(5, 0, 3)), is(UpdateAvailability.Available)); }
@Test public void returnsLatestUpdate2() throws Exception { Update latest = lookup.findLatestUpdate(); assertThat(latest.isUpdateFrom(new NumericVersion(5, 0, 4)), is(UpdateAvailability.NotAvailable)); }
@Test public void returnsExpectedUpdateVersion() throws Exception { Update latest = lookup.findLatestUpdate(); assertThat(latest.getVersion(), is(sameVersionAs(new NumericVersion(5, 0, 4)))); }