@Test
public void testPackAttributes() {

  EnumSet<FileAttribute> attributes = EnumSet.noneOf(FileAttribute.class);
  Assert.assertEquals(DistCpUtils.packAttributes(attributes), "");
  attributes.add(FileAttribute.REPLICATION);
  Assert.assertEquals(DistCpUtils.packAttributes(attributes), "R");
  Assert.assertEquals(attributes, DistCpUtils.unpackAttributes("R"));
  attributes.add(FileAttribute.BLOCKSIZE);
  Assert.assertEquals(DistCpUtils.packAttributes(attributes), "RB");
  Assert.assertEquals(attributes, DistCpUtils.unpackAttributes("RB"));
  attributes.add(FileAttribute.USER);
  Assert.assertEquals(DistCpUtils.packAttributes(attributes), "RBU");
  Assert.assertEquals(attributes, DistCpUtils.unpackAttributes("RBU"));
  attributes.add(FileAttribute.GROUP);
  Assert.assertEquals(DistCpUtils.packAttributes(attributes), "RBUG");
  Assert.assertEquals(attributes, DistCpUtils.unpackAttributes("RBUG"));
  attributes.add(FileAttribute.PERMISSION);
  Assert.assertEquals(DistCpUtils.packAttributes(attributes), "RBUGP");
  Assert.assertEquals(attributes, DistCpUtils.unpackAttributes("RBUGP"));
}