@Test public void appendToProvenanceLog() throws IOException { CacheLocalReadonly cache = new CacheLocalReadonly("some/namespace", tempDirectory.getAbsolutePath()); assertNull(cache.provenanceOf(URI.create("http: ContentProvenance meta = new ContentProvenance("some/namespace", URI.create("http: URI.create("cached:file.zip"), "1234", "1970-01-01T00:00:00Z"); ProvenanceLog.appendProvenanceLog(tempDirectory, meta); ContentProvenance contentProvenance = cache.provenanceOf(URI.create("http: assertThat(contentProvenance.getNamespace(), is("some/namespace")); assertThat(contentProvenance.getSourceURI().toString(), is("http: assertThat(contentProvenance.getSha256(), is("1234")); assertThat(contentProvenance.getAccessedAt(), is("1970-01-01T00:00:00Z")); assertThat(contentProvenance.getType(), is(nullValue())); }
public static void appendProvenanceLog(File cacheDir, ContentProvenance contentProvenance) throws IOException { if (needsCaching(contentProvenance, cacheDir)) { appendProvenanceLog(contentProvenance, cacheDir); } }
ProvenanceLog { public static void appendProvenanceLog(File cacheDir, ContentProvenance contentProvenance) throws IOException { if (needsCaching(contentProvenance, cacheDir)) { appendProvenanceLog(contentProvenance, cacheDir); } } }
ProvenanceLog { public static void appendProvenanceLog(File cacheDir, ContentProvenance contentProvenance) throws IOException { if (needsCaching(contentProvenance, cacheDir)) { appendProvenanceLog(contentProvenance, cacheDir); } }  }
ProvenanceLog { public static void appendProvenanceLog(File cacheDir, ContentProvenance contentProvenance) throws IOException { if (needsCaching(contentProvenance, cacheDir)) { appendProvenanceLog(contentProvenance, cacheDir); } }  static void appendProvenanceLog(File cacheDir, ContentProvenance contentProvenance); static File findProvenanceLogFile(String namespace, String cacheDir); static void parseProvenanceStream(InputStream is, ProvenanceEntryListener listener); }
ProvenanceLog { public static void appendProvenanceLog(File cacheDir, ContentProvenance contentProvenance) throws IOException { if (needsCaching(contentProvenance, cacheDir)) { appendProvenanceLog(contentProvenance, cacheDir); } }  static void appendProvenanceLog(File cacheDir, ContentProvenance contentProvenance); static File findProvenanceLogFile(String namespace, String cacheDir); static void parseProvenanceStream(InputStream is, ProvenanceEntryListener listener); final static String PROVENANCE_LOG_FILENAME; }