TrashProcedure extends BalanceProcedure { public TrashProcedure() {} TrashProcedure();  TrashProcedure(String name, String nextProcedure, long delayDuration,
      FedBalanceContext context); @Override boolean execute(); FedBalanceContext getContext(); @Override void write(DataOutput out); @Override void readFields(DataInput in);  }
@Test public void testTrashProcedure() throws Exception { Path src = new Path("/" + getMethodName() + "-src"); Path dst = new Path("/" + getMethodName() + "-dst"); FileSystem fs = cluster.getFileSystem(); fs.mkdirs(src); fs.mkdirs(new Path(src, "dir")); assertTrue(fs.exists(src)); FedBalanceContext context = new FedBalanceContext.Builder(src, dst, TestDistCpProcedure.MOUNT, conf) .setMapNum(10).setBandwidthLimit(1).setTrash(TrashOption.TRASH) .build(); TrashProcedure trashProcedure = new TrashProcedure("trash-procedure", null, 1000, context); trashProcedure.moveToTrash(); assertFalse(fs.exists(src)); }