public static MessageType convert(Schema schema, String name) {
    return new TypeToMessageType().convert(schema, name);
  }
@Test
  public void testLegacyTwoLevelListTypeWithPrimitiveElement() {
    String parquetSchemaString =
        "message spark_schema {\n"
            + "  optional group arraybytes (LIST) {\n"
            + "    repeated binary array;\n"
            + "  }\n"
            + "}\n";
    MessageType messageType = MessageTypeParser.parseMessageType(parquetSchemaString);

    Schema expectedSchema =
        new Schema(
            optional(1, "arraybytes", Types.ListType.ofRequired(1000, Types.BinaryType.get())));

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