public CategoricalInfo(String name) {
        super(name);
    }
@Test
    void testCategoricalInfo() throws Exception {
        CategoricalInfo info = new CategoricalInfo("cat");
        IntStream.range(0, 10).forEach(i -> {
            IntStream.range(0, i*2).forEach(j -> {
                info.observe(i);
            });
        });

        VariableInfoProto infoProto = info.serialize();
        assertEquals(0, infoProto.getVersion());
        assertEquals("org.tribuo.CategoricalInfo", infoProto.getClassName());
        CategoricalInfoProto proto = infoProto.getSerializedData().unpack(CategoricalInfoProto.class);
        assertEquals("cat", proto.getName());
        assertEquals(90, proto.getCount());
        assertEquals(0, proto.getObservedCount());
        assertEquals(Double.NaN, proto.getObservedValue());

        List<Double> keyList = proto.getKeyList();
        List<Long> valueList = proto.getValueList();

        assertEquals(9, keyList.size());
        assertEquals(9, valueList.size());

        Map<Double, Long> expectedCounts = new HashMap<>();
        IntStream.range(0, 10).forEach(i -> {
            long count = info.getObservationCount(i);
            expectedCounts.put((double)i, count);
        });

        for (int i=0; i<keyList.size(); i++) {
            assertEquals(expectedCounts.get(keyList.get(i)), valueList.get(i));
        }

        VariableInfo infoD = ProtoUtil.deserialize(infoProto);
        assertEquals(info, infoD);
    }