@Test
void testSample() {

    compile(messageGenerator, "protostuff_unittest/messages_sample.proto");
    Assertions.assertEquals(4, json.size());
    Assertions.assertEquals(ImmutableMessageDescriptor.builder()
            .name("A")
            .type(NodeType.MESSAGE)
            .canonicalName("protostuff_unittest.A")
            .description("")
            .addFields(ImmutableMessageField.builder()
                    .name("a")
                    .typeId("int32")
                    .modifier(MessageFieldModifier.REPEATED)
                    .tag(1)
                    .map(false)
                    .description("")
                    .build())
            .build(), json.get(0));
    Assertions.assertEquals(ImmutableMessageDescriptor.builder()
            .name("B")
            .type(NodeType.MESSAGE)
            .canonicalName("protostuff_unittest.A.B")
            .description("")
            .addFields(ImmutableMessageField.builder()
                    .name("b")
                    .typeId("int32")
                    .modifier(MessageFieldModifier.OPTIONAL)
                    .tag(1)
                    .map(false)
                    .description("")
                    .build())
            .build(), json.get(1));
    Assertions.assertEquals(ImmutableMessageDescriptor.builder()
            .name("C")
            .type(NodeType.MESSAGE)
            .canonicalName("protostuff_unittest.A.B.C")
            .description("")
            .addFields(ImmutableMessageField.builder()
                    .name("c")
                    .typeId("int32")
                    .modifier(MessageFieldModifier.OPTIONAL)
                    .tag(1)
                    .map(false)
                    .description("")
                    .build())
            .build(), json.get(2));
    Assertions.assertEquals(ImmutableMessageDescriptor.builder()
            .name("D")
            .type(NodeType.MESSAGE)
            .canonicalName("protostuff_unittest.A.B.C.D")
            .description("")
            .addFields(ImmutableMessageField.builder()
                    .name("d")
                    .typeId("int32")
                    .modifier(MessageFieldModifier.OPTIONAL)
                    .tag(1)
                    .map(false)
                    .description("")
                    .build())
            .build(), json.get(3));
}