DirListingMetadata { public void setAuthoritative(boolean authoritative) { this.isAuthoritative = authoritative; } DirListingMetadata(Path path, Collection<PathMetadata> listing,
      boolean isAuthoritative);  DirListingMetadata(DirListingMetadata d); Path getPath(); Collection<PathMetadata> getListing(); Set<Path> listTombstones(); DirListingMetadata withoutTombstones(); int numEntries(); boolean isAuthoritative(); Tristate isEmpty(); void setAuthoritative(boolean authoritative); PathMetadata get(Path childPath); void markDeleted(Path childPath); void remove(Path childPath); boolean put(FileStatus childFileStatus); @Override String toString(); void prettyPrint(StringBuilder sb); String prettyPrint(); static final Collection<PathMetadata> EMPTY_DIR; }
@Test public void testSetAuthoritative() { Path path = new Path("/path"); DirListingMetadata meta = new DirListingMetadata(path, null, false); assertEquals(path, meta.getPath()); assertNotNull(meta.getListing()); assertTrue(meta.getListing().isEmpty()); assertFalse(meta.isAuthoritative()); meta.setAuthoritative(true); assertTrue(meta.isAuthoritative()); }