### Question:
HdfsPartitionRemoteFileOps implements PartitionRemoteFileOps { @Override public boolean attemptDelete(String remoteRelativePath) throws IOException { if (exists(remoteRelativePath)) { Path pathToDelete = new Path(getRemoteAbsolutePath(remoteRelativePath)); if (useTrash) { TrashHelper.deleteUsingTrashIfEnabled(fs, pathToDelete); } else { fs.delete(pathToDelete, true); } } return true; } HdfsPartitionRemoteFileOps(String remoteDomainRoot,
                                    int partitionNumber);  HdfsPartitionRemoteFileOps(String remoteDomainRoot,
                                    int partitionNumber,
                                    boolean useTrash);  HdfsPartitionRemoteFileOps(String remoteDomainRoot,
                                    int partitionNumber,
                                    CompressionCodec compressionCodec);  HdfsPartitionRemoteFileOps(String remoteDomainRoot,
                                    int partitionNumber,
                                    CompressionCodec compressionCodec,
                                    boolean useTrash); @Override InputStream getInputStream(String remoteRelativePath); @Override OutputStream getOutputStream(String remoteRelativePath); @Override boolean exists(String remoteRelativePath); @Override void copyToLocalRoot(String remoteSourceRelativePath, String localDestinationRoot); @Override boolean attemptDelete(String remoteRelativePath); @Override String getRemoteAbsolutePath(String relativePath); static String getRemoteAbsolutePath(String remoteDomainRoot,
                                             int partitionNumber,
                                             String relativePath,
                                             CompressionCodec compressionCodec); static String getRemoteAbsolutePath(String remoteDomainRoot,
                                             int partitionNumber,
                                             String relativePath); @Override String toString();  }### Answer:
@Test public void testAttemptDelete() throws Exception { assertTrue(fs.exists(new Path(ROOT, "0/file1.txt"))); assertTrue(hdfsFileOps.attemptDelete("file1.txt")); assertFalse(fs.exists(new Path(ROOT, "0/file1.txt"))); }