### Question:
FileStorageService implements StorageService { @PreDestroy public void stop() throws IOException { deleteDirectory(baseStagingDir); } @Inject  FileStorageService(StorageManagerConfig config);  FileStorageService(File dataDirectory); @Override @PostConstruct void start(); @Override long getAvailableBytes(); @PreDestroy void stop(); @Override File getStorageFile(UUID shardUuid); @Override File getStagingFile(UUID shardUuid); @Override File getQuarantineFile(UUID shardUuid); @Override Set<UUID> getStorageShards(); @Override void createParents(File file); static File getFileSystemPath(File base, UUID shardUuid);  }### Answer:
@Test public void testStop() throws Exception { File staging = new File(temporary, "staging"); File storage = new File(temporary, "storage"); File quarantine = new File(temporary, "quarantine"); assertDirectory(staging); assertDirectory(storage); assertDirectory(quarantine); File file = store.getStagingFile(randomUUID()); store.createParents(file); assertFalse(file.exists()); assertTrue(file.createNewFile()); assertFile(file); store.stop(); assertFalse(file.exists()); assertFalse(staging.exists()); assertDirectory(storage); assertDirectory(quarantine); }