### Question:
CommunityHistogram { public static Histogram buildFrom(HugeLongLongMap communitySizeMap) { final Histogram histogram = new Histogram(5); for (LongLongCursor cursor : communitySizeMap) { histogram.recordValue(cursor.value); } return histogram; }  static Histogram buildFrom(HugeLongLongMap communitySizeMap);  }### Answer:
@Test void oneCommunityFromHugeMap() { HugeLongLongMap communitySizeMap = new HugeLongLongMap(AllocationTracker.empty()); communitySizeMap.addTo(1, 4); Histogram histogram = CommunityHistogram.buildFrom(communitySizeMap); assertEquals(4.0, histogram.getValueAtPercentile(100D), 0.01); }
@Test void multipleCommunitiesFromHugeMap() { HugeLongLongMap communitySizeMap = new HugeLongLongMap(AllocationTracker.empty()); communitySizeMap.addTo(1, 4); communitySizeMap.addTo(2, 10); communitySizeMap.addTo(3, 9); communitySizeMap.addTo(4, 8); communitySizeMap.addTo(5, 7); Histogram histogram = CommunityHistogram.buildFrom(communitySizeMap); assertEquals(10.0, histogram.getValueAtPercentile(100D), 0.01); assertEquals(8.0, histogram.getValueAtPercentile(50D), 0.01); }