@Override
  public void setConf(Configuration conf) {
    super.setConf(conf);
    if (conf != null) {
      bytesPerChecksum = conf.getInt(LocalFileSystemConfigKeys.LOCAL_FS_BYTES_PER_CHECKSUM_KEY,
		                     LocalFileSystemConfigKeys.LOCAL_FS_BYTES_PER_CHECKSUM_DEFAULT);
      Preconditions.checkState(bytesPerChecksum > 0,
          "bytes per checksum should be positive but was %s",
          bytesPerChecksum);
    }
  }
@Test
  public void testSetConf() {
    Configuration conf = new Configuration();

    conf.setInt(LocalFileSystemConfigKeys.LOCAL_FS_BYTES_PER_CHECKSUM_KEY, 0);
    try {
      localFs.setConf(conf);
      fail("Should have failed because zero bytes per checksum is invalid");
    } catch (IllegalStateException ignored) {
    }

    conf.setInt(LocalFileSystemConfigKeys.LOCAL_FS_BYTES_PER_CHECKSUM_KEY, -1);
    try {
      localFs.setConf(conf);
      fail("Should have failed because negative bytes per checksum is invalid");
    } catch (IllegalStateException ignored) {
    }

    conf.setInt(LocalFileSystemConfigKeys.LOCAL_FS_BYTES_PER_CHECKSUM_KEY, 512);
    localFs.setConf(conf);

  }