public static MessageType convert(Schema schema, String name) {
    return new TypeToMessageType().convert(schema, name);
  }
@Test
  public void testLegacyTwoLevelListTypeWithGroupTypeElementWithTwoFields() {
    String messageType =
        "message root {"
            + "  required group f0 {"
            + "    required group f00 (LIST) {"
            + "      repeated group element {"
            + "        required int32 f000;"
            + "        optional int64 f001;"
            + "      }"
            + "    }"
            + "  }"
            + "}";

    MessageType parquetScehma = MessageTypeParser.parseMessageType(messageType);
    Schema expectedSchema =
        new Schema(
            required(
                1,
                "f0",
                Types.StructType.of(
                    required(
                        1003,
                        "f00",
                        Types.ListType.ofRequired(
                            1002,
                            Types.StructType.of(
                                required(1000, "f000", Types.IntegerType.get()),
                                optional(1001, "f001", Types.LongType.get())))))));

    Schema actualSchema = ParquetSchemaUtil.convert(parquetScehma);
    assertThat(actualSchema.asStruct())
        .as("Schema must match")
        .isEqualTo(expectedSchema.asStruct());
  }