### Question:
FilterFileSystem extends FileSystem { @Override public void setWriteChecksum(boolean writeChecksum) { fs.setWriteChecksum(writeChecksum); } FilterFileSystem();  FilterFileSystem(FileSystem fs); FileSystem getRawFileSystem(); void initialize(URI name, Configuration conf); URI getUri(); Path makeQualified(Path path); BlockLocation[] getFileBlockLocations(FileStatus file, long start,
    long len); @Override Path resolvePath(final Path p); FSDataInputStream open(Path f, int bufferSize); FSDataOutputStream append(Path f, int bufferSize,
      Progressable progress); @Override void concat(Path f, Path[] psrcs); @Override FSDataOutputStream create(Path f, FsPermission permission,
      boolean overwrite, int bufferSize, short replication, long blockSize,
      Progressable progress); @Override @Deprecated FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
      EnumSet<CreateFlag> flags, 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); FileStatus[] listStatus(Path f); @Override RemoteIterator<Path> listCorruptFileBlocks(Path path); RemoteIterator<LocatedFileStatus> listLocatedStatus(Path f); Path getHomeDirectory(); void setWorkingDirectory(Path newDir); Path getWorkingDirectory(); @Override FsStatus getStatus(Path p); @Override boolean mkdirs(Path f, FsPermission permission); void copyFromLocalFile(boolean delSrc, Path src, Path dst); void copyFromLocalFile(boolean delSrc, boolean overwrite, 
                                Path[] srcs, Path dst); void copyFromLocalFile(boolean delSrc, boolean overwrite, 
                                Path src, Path dst); void copyToLocalFile(boolean delSrc, Path src, Path dst); Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile); void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile); long getUsed(); @Override long getDefaultBlockSize(); @Override short getDefaultReplication(); @Override FsServerDefaults getServerDefaults(); @Override ContentSummary getContentSummary(Path f); @Override long getDefaultBlockSize(Path f); @Override short getDefaultReplication(Path f); @Override FsServerDefaults getServerDefaults(Path f); FileStatus getFileStatus(Path f); FileChecksum getFileChecksum(Path f); void setVerifyChecksum(boolean verifyChecksum); @Override void setWriteChecksum(boolean writeChecksum); @Override Configuration getConf(); @Override void close(); @Override void setOwner(Path p, String username, String groupname
      ); @Override void setTimes(Path p, long mtime, long atime
      ); @Override void setPermission(Path p, FsPermission permission
      ); @Override // FileSystem FileSystem[] getChildFileSystems();  }### Answer:
@Test public void testWriteChecksumPassthru() { FileSystem mockFs = mock(FileSystem.class); FileSystem fs = new FilterFileSystem(mockFs); fs.setWriteChecksum(false); verify(mockFs).setWriteChecksum(eq(false)); reset(mockFs); fs.setWriteChecksum(true); verify(mockFs).setWriteChecksum(eq(true)); }