### Question:
ChecksumFileSystem extends FilterFileSystem { @Override public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException { return create(f, permission, overwrite, true, bufferSize, replication, blockSize, progress); } ChecksumFileSystem(FileSystem fs); static double getApproxChkSumLength(long size); void setConf(Configuration conf); void setVerifyChecksum(boolean verifyChecksum); @Override void setWriteChecksum(boolean writeChecksum); FileSystem getRawFileSystem(); Path getChecksumFile(Path file); static boolean isChecksumFile(Path file); long getChecksumFileLength(Path file, long fileSize); int getBytesPerSum(); @Override FSDataInputStream open(Path f, int bufferSize); FSDataOutputStream append(Path f, int bufferSize,
      Progressable progress); static long getChecksumLength(long size, int bytesPerSum); @Override FSDataOutputStream create(Path f, FsPermission permission,
      boolean overwrite, int bufferSize, short replication, long blockSize,
      Progressable progress); @Override FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
      boolean overwrite, int bufferSize, short replication, long blockSize,
      Progressable progress); boolean setReplication(Path src, short replication); boolean rename(Path src, Path dst); boolean delete(Path f, boolean recursive); @Override FileStatus[] listStatus(Path f); @Override RemoteIterator<LocatedFileStatus> listLocatedStatus(Path f); @Override boolean mkdirs(Path f); @Override void copyFromLocalFile(boolean delSrc, Path src, Path dst); @Override void copyToLocalFile(boolean delSrc, Path src, Path dst); void copyToLocalFile(Path src, Path dst, boolean copyCrc); @Override Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile); @Override void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile); boolean reportChecksumFailure(Path f, FSDataInputStream in,
                                       long inPos, FSDataInputStream sums, long sumsPos);  }### Answer:
@Test public void testMultiChunkFile() throws Exception { Path testPath = new Path(TEST_ROOT_DIR, "testMultiChunk"); FSDataOutputStream fout = localFs.create(testPath); for (int i = 0; i < 1000; i++) { fout.write(("testing" + i).getBytes()); } fout.close(); readFile(localFs, testPath, 128); readFile(localFs, testPath, 511); readFile(localFs, testPath, 512); readFile(localFs, testPath, 513); readFile(localFs, testPath, 1023); readFile(localFs, testPath, 1024); readFile(localFs, testPath, 1025); }