### Question:
FileStorageService implements StorageService { @Override public Set<UUID> getStorageShards() { ImmutableSet.Builder<UUID> shards = ImmutableSet.builder(); for (File level1 : listFiles(baseStorageDir, FileStorageService::isHexDirectory)) { for (File level2 : listFiles(level1, FileStorageService::isHexDirectory)) { for (File file : listFiles(level2, path -> true)) { if (file.isFile()) { uuidFromFileName(file.getName()).ifPresent(shards::add); } } } } return shards.build(); } @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 testGetStorageShards() throws Exception { Set<UUID> shards = ImmutableSet.<UUID>builder() .add(UUID.fromString("9e7abb51-56b5-4180-9164-ad08ddfe7c63")) .add(UUID.fromString("bbfc3895-1c3d-4bf4-bca4-7b1198b1759e")) .build(); for (UUID shard : shards) { File file = store.getStorageFile(shard); store.createParents(file); assertTrue(file.createNewFile()); } File storage = new File(temporary, "storage"); assertTrue(new File(storage, "abc").mkdir()); assertTrue(new File(storage, "ab/cd").mkdirs()); assertTrue(new File(storage, format("ab/cd/%s.junk", randomUUID())).createNewFile()); assertTrue(new File(storage, "ab/cd/junk.orc").createNewFile()); assertEquals(store.getStorageShards(), shards); }