### Question:
DataChecksum implements Checksum { @Override public String toString() { String strType = getNameOfType(type); return "DataChecksum(type=" + strType + ", chunkSize=" + bytesPerChecksum + ")"; } private  DataChecksum( int checksumType, Checksum checksum,
                        int sumSize, int chunkSize ); static DataChecksum newDataChecksum( int type, int bytesPerChecksum ); static DataChecksum newDataChecksum( byte bytes[], int offset ); static DataChecksum newDataChecksum( DataInputStream in ); void writeHeader( DataOutputStream out ); byte[] getHeader(); int writeValue( DataOutputStream out, boolean reset ); int writeValue( byte[] buf, int offset, boolean reset ); boolean compare( byte buf[], int offset ); int getChecksumType(); int getChecksumSize(); int getBytesPerChecksum(); int getNumBytesInSum(); static int getChecksumHeaderSize(); long getValue(); void reset(); void update( byte[] b, int off, int len ); void update( int b ); void verifyChunkedSums(ByteBuffer data, ByteBuffer checksums,
      String fileName, long basePos); void calculateChunkedSums(ByteBuffer data, ByteBuffer checksums); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); static String getNameOfType(int checksumType); static int getTypeFromName(String checksumName); static final int HEADER_LEN; static final int CHECKSUM_NULL; static final int CHECKSUM_CRC32; static final int CHECKSUM_CRC32C; static final int CHECKSUM_DEFAULT; static final int CHECKSUM_MIXED; static final int SIZE_OF_INTEGER; }### Answer:
@Test public void testToString() { assertEquals("DataChecksum(type=CRC32, chunkSize=512)", DataChecksum.newDataChecksum(DataChecksum.CHECKSUM_CRC32, 512) .toString()); }