public static Comparator<StructLike> forType(Types.StructType struct) {
    return new StructLikeComparator(struct);
  }
@Test
  public void testList() {
    assertComparesCorrectly(
        Comparators.forType(Types.ListType.ofRequired(18, Types.IntegerType.get())),
        ImmutableList.of(1, 1, 1),
        ImmutableList.of(1, 1, 2));

    assertComparesCorrectly(
        Comparators.forType(Types.ListType.ofRequired(18, Types.IntegerType.get())),
        ImmutableList.of(1, 1),
        ImmutableList.of(1, 1, 1));

    assertComparesCorrectly(
        Comparators.forType(Types.ListType.ofOptional(18, Types.IntegerType.get())),
        Collections.singletonList(null),
        Collections.singletonList(1));
  }