@VisibleForTesting
    static DwrfProto.Stream.Kind toStreamKind(StreamKind streamKind)
    {
        switch (streamKind) {
            case PRESENT:
                return DwrfProto.Stream.Kind.PRESENT;
            case DATA:
                return DwrfProto.Stream.Kind.DATA;
            case SECONDARY:
                return DwrfProto.Stream.Kind.NANO_DATA;
            case LENGTH:
                return DwrfProto.Stream.Kind.LENGTH;
            case DICTIONARY_DATA:
                return DwrfProto.Stream.Kind.DICTIONARY_DATA;
            case DICTIONARY_COUNT:
                return DwrfProto.Stream.Kind.DICTIONARY_COUNT;
            case ROW_INDEX:
                return DwrfProto.Stream.Kind.ROW_INDEX;
            case IN_MAP:
                return DwrfProto.Stream.Kind.IN_MAP;
        }
        throw new IllegalArgumentException("Unsupported stream kind: " + streamKind);
    }
@Test
    public void testToStreamKind()
    {
        assertEquals(toStreamKind(PRESENT), DwrfProto.Stream.Kind.PRESENT);
        assertEquals(toStreamKind(IN_MAP), DwrfProto.Stream.Kind.IN_MAP);
        assertEquals(toStreamKind(DATA), DwrfProto.Stream.Kind.DATA);
        assertEquals(toStreamKind(SECONDARY), DwrfProto.Stream.Kind.NANO_DATA);
        assertEquals(toStreamKind(LENGTH), DwrfProto.Stream.Kind.LENGTH);
        assertEquals(toStreamKind(DICTIONARY_DATA), DwrfProto.Stream.Kind.DICTIONARY_DATA);
        assertEquals(toStreamKind(DICTIONARY_COUNT), DwrfProto.Stream.Kind.DICTIONARY_COUNT);
        assertEquals(toStreamKind(ROW_INDEX), DwrfProto.Stream.Kind.ROW_INDEX);
    }