### Question:
DeleteCleanupPolicy implements FileCleanupPolicy { @Override public void configure(final Map<String, ?> configs) { }  @Override void configure(final Map<String, ?> configs); @Override boolean onSuccess(final SourceFile source); @Override boolean onFailure(final SourceFile source); @Override void close();  }### Answer:
@Test public void shouldDeleteSourceFileGivenCompletedSource() { DeleteCleanupPolicy policy = new DeleteCleanupPolicy(); policy.configure(Collections.emptyMap()); Boolean result = policy.apply(source.withStatus(SourceStatus.COMPLETED)); assertTrue(result); assertFalse(Files.exists(file.toPath())); }
@Test public void shouldDeleteSourceFileGivenFailedSource() { DeleteCleanupPolicy policy = new DeleteCleanupPolicy(); policy.configure(Collections.emptyMap()); Boolean result = policy.apply(source.withStatus(SourceStatus.FAILED)); assertTrue(result); assertFalse(Files.exists(file.toPath())); }