ContentSummary extends QuotaUsage implements Writable { @Override @InterfaceAudience.Private public void write(DataOutput out) throws IOException { out.writeLong(length); out.writeLong(fileCount); out.writeLong(directoryCount); out.writeLong(getQuota()); out.writeLong(getSpaceConsumed()); out.writeLong(getSpaceQuota()); } @Deprecated  ContentSummary(); @Deprecated  ContentSummary(long length, long fileCount, long directoryCount); @Deprecated  ContentSummary(
      long length, long fileCount, long directoryCount, long quota,
      long spaceConsumed, long spaceQuota); private  ContentSummary(Builder builder); long getLength(); long getSnapshotLength(); long getDirectoryCount(); long getSnapshotDirectoryCount(); long getFileCount(); long getSnapshotFileCount(); long getSnapshotSpaceConsumed(); String getErasureCodingPolicy(); @Override @InterfaceAudience.Private void write(DataOutput out); @Override @InterfaceAudience.Private void readFields(DataInput in); @Override boolean equals(Object to); @Override int hashCode(); static String getHeader(boolean qOption); static String getSnapshotHeader(); static String[] getHeaderFields(); static String[] getQuotaHeaderFields(); @Override String toString(); @Override String toString(boolean qOption); String toString(boolean qOption, boolean hOption); String toString(boolean qOption, boolean hOption, boolean xOption); String toString(boolean qOption, boolean hOption,
                         boolean tOption, List<StorageType> types); String toString(boolean qOption, boolean hOption, boolean tOption,
      boolean xOption, List<StorageType> types); String toSnapshot(boolean hOption);  }
@Test public void testWrite() throws IOException { long length = 11111; long fileCount = 22222; long directoryCount = 33333; long quota = 44444; long spaceConsumed = 55555; long spaceQuota = 66666; ContentSummary contentSummary = new ContentSummary.Builder().length(length). fileCount(fileCount).directoryCount(directoryCount).quota(quota). spaceConsumed(spaceConsumed).spaceQuota(spaceQuota).build(); DataOutput out = mock(DataOutput.class); InOrder inOrder = inOrder(out); contentSummary.write(out); inOrder.verify(out).writeLong(length); inOrder.verify(out).writeLong(fileCount); inOrder.verify(out).writeLong(directoryCount); inOrder.verify(out).writeLong(quota); inOrder.verify(out).writeLong(spaceConsumed); inOrder.verify(out).writeLong(spaceQuota); }