@Test
public void testPackAttributes() {

  EnumSet<FileAttribute> attributes = EnumSet.noneOf(FileAttribute.class);
  assertThat(DistCpUtils.packAttributes(attributes)).isEqualTo("");
  attributes.add(FileAttribute.REPLICATION);
  assertThat(DistCpUtils.packAttributes(attributes)).isEqualTo("R");
  attributes.add(FileAttribute.BLOCKSIZE);
  assertThat(DistCpUtils.packAttributes(attributes)).isEqualTo("RB");
  attributes.add(FileAttribute.USER);
  attributes.add(FileAttribute.CHECKSUMTYPE);
  assertThat(DistCpUtils.packAttributes(attributes)).isEqualTo("RBUC");
  attributes.add(FileAttribute.GROUP);
  assertThat(DistCpUtils.packAttributes(attributes)).isEqualTo("RBUGC");
  attributes.add(FileAttribute.PERMISSION);
  assertThat(DistCpUtils.packAttributes(attributes)).isEqualTo("RBUGPC");
  attributes.add(FileAttribute.TIMES);
  assertThat(DistCpUtils.packAttributes(attributes)).isEqualTo("RBUGPCT");
}