public static ContentClusterStats generate(Distributor distributor) {
        Map<Integer, ContentNodeStats> mapToNodeStats = new HashMap<>();
        for (StorageNode storageNode : distributor.getStorageNodes()) {
            mapToNodeStats.put(storageNode.getIndex(), new ContentNodeStats(storageNode));
        }
        return new ContentClusterStats(mapToNodeStats);
    }
@Test
    void testContentNodeStats() throws IOException {
        String data = getJsonString();
        HostInfo hostInfo = HostInfo.createHostInfo(data);

        ContentClusterStats clusterStats = StorageNodeStatsBridge.generate(hostInfo.getDistributor());
        Iterator<ContentNodeStats> itr = clusterStats.iterator();
        { // content node 0
            ContentNodeStats stats = itr.next();
            assertThat(stats.getNodeIndex(), is(0));
            assertThat(stats.getBucketSpaces().size(), is(2));
            assertBucketSpaceStats(11, 3, stats.getBucketSpaces().get("default"));
            assertBucketSpaceStats(13, 5, stats.getBucketSpaces().get("global"));
        }
        { // content node 1
            ContentNodeStats stats = itr.next();
            assertThat(stats.getNodeIndex(), is(1));
            assertThat(stats.getBucketSpaces().size(), is(1));
            assertBucketSpaceStats(0, 0, stats.getBucketSpaces().get("default"));
        }
        assertFalse(itr.hasNext());
    }