DirListingMetadata extends ExpirableMetadata { public void setAuthoritative(boolean authoritative) { this.isAuthoritative = authoritative; } DirListingMetadata(Path path, Collection<PathMetadata> listing,
      boolean isAuthoritative, long lastUpdated);  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, long lastUpdated); void remove(Path childPath); boolean put(PathMetadata childPathMetadata); @Override String toString(); synchronized List<PathMetadata> removeExpiredEntriesFromListing(
      long ttl, long now); 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()); }