@Override
    public Metrics toDay() {
        SumLabeledFunction metrics = (SumLabeledFunction) createNew();
        metrics.setEntityId(getEntityId());
        metrics.setTimeBucket(toTimeBucketInDay());
        metrics.setServiceId(getServiceId());
        metrics.getValue().copyFrom(getValue());
        return metrics;
    }
@Test
    public void testToDay() {
        function.accept(
            MeterEntity.newService("service-test", Layer.GENERAL),
            HTTP_CODE_COUNT_1
        );
        function.accept(
            MeterEntity.newService("service-test", Layer.GENERAL),
            HTTP_CODE_COUNT_2
        );
        function.calculate();

        final SumLabeledFunction dayFunction = (SumLabeledFunction) function.toDay();
        dayFunction.calculate();

        Assertions.assertEquals(dayFunction.getValue(), new DataTable("200,3|301,2|404,7|502,9|505,1"));
    }