@Override
    public Class<? extends AvgHistogramFunctionBuilder> builder() {
        return AvgHistogramFunctionBuilder.class;
    }
@Test
    public void testBuilder() throws IllegalAccessException, InstantiationException {
        HistogramFunctionInst inst = new HistogramFunctionInst();
        inst.accept(
            MeterEntity.newService("service-test", Layer.GENERAL),
            new BucketedValues(
                BUCKETS, new long[] {
                1,
                4,
                10,
                10
            })
        );
        inst.calculate();

        final StorageBuilder storageBuilder = inst.builder().newInstance();

        // Simulate the storage layer do, convert the datatable to string.
        final HashMapConverter.ToStorage toStorage = new HashMapConverter.ToStorage();
        storageBuilder.entity2Storage(inst, toStorage);
        final Map<String, Object> map = toStorage.obtain();
        map.put(SUMMATION, ((DataTable) map.get(SUMMATION)).toStorageData());
        map.put(COUNT, ((DataTable) map.get(COUNT)).toStorageData());
        map.put(DATASET, ((DataTable) map.get(DATASET)).toStorageData());

        final AvgHistogramFunction inst2 = (AvgHistogramFunction) storageBuilder.storage2Entity(
            new HashMapConverter.ToEntity(map));
        Assertions.assertEquals(inst, inst2);
        // HistogramFunction equal doesn't include dataset.
        Assertions.assertEquals(inst.getDataset(), inst2.getDataset());
    }