Trash extends Configured { TrashPolicy getTrashPolicy() { return trashPolicy; } Trash(Configuration conf);  Trash(FileSystem fs, Configuration conf); static boolean moveToAppropriateTrash(FileSystem fs, Path p,
      Configuration conf); boolean isEnabled(); boolean moveToTrash(Path path); void checkpoint(); void expunge(); void expungeImmediately(); Runnable getEmptier(); Path getCurrentTrashDir(Path path);  }
@Test public void testPluggableTrash() throws IOException { Configuration conf = new Configuration(); conf.setClass("fs.trash.classname", TestTrashPolicy.class, TrashPolicy.class); Trash trash = new Trash(conf); assertTrue(trash.getTrashPolicy().getClass().equals(TestTrashPolicy.class)); }