@Test
void fieldModifiers() {

    compile(messageGenerator, "protostuff_unittest/field_modifiers.proto");
    Assertions.assertEquals(1, json.size());
    Assertions.assertEquals(ImmutableMessageDescriptor.builder()
            .name("A")
            .type(NodeType.MESSAGE)
            .canonicalName("protostuff_unittest.A")
            .description("")
            .addFields(ImmutableMessageField.builder()
                    .name("optional")
                    .typeId("int32")
                    .modifier(MessageFieldModifier.OPTIONAL)
                    .tag(1)
                    .map(false)
                    .description("")
                    .build())
            .addFields(ImmutableMessageField.builder()
                    .name("required")
                    .typeId("int32")
                    .modifier(MessageFieldModifier.REQUIRED)
                    .tag(2)
                    .map(false)
                    .description("")
                    .build())
            .addFields(ImmutableMessageField.builder()
                    .name("repeated")
                    .typeId("int32")
                    .modifier(MessageFieldModifier.REPEATED)
                    .tag(3)
                    .map(false)
                    .description("")
                    .build())
            .build(), json.get(0));
}