public static void validate(FilterPredicate predicate, MessageType schema) {
    Objects.requireNonNull(predicate, "predicate cannot be null");
    Objects.requireNonNull(schema, "schema cannot be null");
    predicate.accept(new SchemaCompatibilityValidator(schema));
  }
@Test
  public void testRepeatedNotSupportedForPrimitivePredicates() {
    try {
      validate(eq(lotsOfLongs, 10l), schema);
      fail("this should throw");
    } catch (IllegalArgumentException e) {
      assertEquals(
          "FilterPredicates do not currently support repeated columns. Column lotsOfLongs is repeated.",
          e.getMessage());
    }
  }