### Question:
S3FileHandler { public void deleteAllFilesInFolder(String bucketName, String folderPath) { var searchPath = "s3: try { var files = resolver.getResources(searchPath); for (var file : files) { deleteFile(bucketName, file.getFilename()); } } catch (IOException e) { throw new RuntimeException(e); } } S3FileHandler(AmazonS3 amazonS3, ApplicationContext context); Resource[] listFilesInFolder(String bucketName, String folderPath, String filePattern); void deleteFile(String bucketName, String filePath); void copyFile(String fromBucketName, String fromFilePath, String toBucketName, String toFilePath); Resource moveFileToWorkFolder(String bucketName, String filePath, String folderName, String workFolderSuffix); void deleteAllFilesInFolder(String bucketName, String folderPath); void deleteAllFilesInFolderExcept(String bucketName, String folderPath, List<String> excludeList);  }### Answer:
@Test @Tag("S3Test") public void testDeleteAllFilesInFolder() { amazonS3.putObject(BUCKET_NAME, "_unittest/forMove/a.txt", "dummy"); amazonS3.putObject(BUCKET_NAME, "_unittest/forMove/b.txt", "dummy"); amazonS3.putObject(BUCKET_NAME, "_unittest/forMove/c.txt", "dummy"); handler.deleteAllFilesInFolder(BUCKET_NAME, "_unittest/forMove"); var objectSummaries = amazonS3.listObjects(BUCKET_NAME, "_unittest/forMove").getObjectSummaries(); assertThat(objectSummaries).hasSize(0); }