@Test
void testQuestionWithEnumProtoFile() {

    Proto proto = generator.generate("org.kie.kogito.test.persons", Collections.singleton(Question.class));
    assertThat(proto).isNotNull();
    assertThat(proto.getPackageName()).isEqualTo("org.kie.kogito.test.persons");
    assertThat(proto.getSyntax()).isEqualTo("proto2");
    assertThat(proto.getMessages()).hasSize(1);
    ProtoMessage question = proto.getMessages().get(0);
    assertThat(question).isNotNull();
    assertThat(question.getName()).isEqualTo("Question");
    assertThat(question.getJavaPackageOption()).isEqualTo("org.kie.kogito.codegen.data");
    assertThat(question.getFields()).hasSize(2);
    ProtoField field = question.getFields().get(0);
    assertThat(field).isNotNull();
    assertThat(field.getName()).isEqualTo("answer");
    assertThat(field.getType()).isEqualTo("Answer");
    assertThat(field.getApplicability()).isEqualTo("optional");
    field = question.getFields().get(1);
    assertThat(field).isNotNull();
    assertThat(field.getName()).isEqualTo("question");
    assertThat(field.getType()).isEqualTo("string");
    assertThat(field.getApplicability()).isEqualTo("optional");
}