### Question:
ContentSummary implements Writable { @Override @InterfaceAudience.Private public void readFields(DataInput in) throws IOException { this.length = in.readLong(); this.fileCount = in.readLong(); this.directoryCount = in.readLong(); this.quota = in.readLong(); this.spaceConsumed = in.readLong(); this.spaceQuota = in.readLong(); } @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(
      long length, long fileCount, long directoryCount, long quota,
      long spaceConsumed, long spaceQuota, long typeConsumed[],
      long typeQuota[]); long getLength(); long getDirectoryCount(); long getFileCount(); long getQuota(); long getSpaceConsumed(); long getSpaceQuota(); long getTypeQuota(StorageType type); long getTypeConsumed(StorageType type); boolean isTypeQuotaSet(); boolean isTypeConsumedAvailable(); @Override @InterfaceAudience.Private void write(DataOutput out); @Override @InterfaceAudience.Private void readFields(DataInput in); static String getHeader(boolean qOption); static String[] getHeaderFields(); static String[] getQuotaHeaderFields(); @Override String toString(); String toString(boolean qOption); String toString(boolean qOption, boolean hOption);  }### Answer:
@Test public void testReadFields() 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().build(); DataInput in = mock(DataInput.class); when(in.readLong()).thenReturn(length).thenReturn(fileCount) .thenReturn(directoryCount).thenReturn(quota).thenReturn(spaceConsumed) .thenReturn(spaceQuota); contentSummary.readFields(in); assertEquals("getLength", length, contentSummary.getLength()); assertEquals("getFileCount", fileCount, contentSummary.getFileCount()); assertEquals("getDirectoryCount", directoryCount, contentSummary.getDirectoryCount()); assertEquals("getQuota", quota, contentSummary.getQuota()); assertEquals("getSpaceConsumed", spaceConsumed, contentSummary.getSpaceConsumed()); assertEquals("getSpaceQuota", spaceQuota, contentSummary.getSpaceQuota()); }