public static FieldScope ignoringFields(int firstFieldNumber, int... rest) {
    return FieldScopeImpl.createIgnoringFields(asList(firstFieldNumber, rest));
  }
@Test
  public void testIgnoringTopLevelAnyField_ignoringField() {
    String typeUrl =
        isProto3()
            ? "type.googleapis.com/com.google.common.truth.extensions.proto.SubTestMessage3"
            : "type.googleapis.com/com.google.common.truth.extensions.proto.SubTestMessage2";
    Message message = parse("o_int: 1 o_any_message { [" + typeUrl + "]: { r_string: \"foo\" } }");
    Message diffMessage = parse("o_int: 1");
    int goodFieldNumber = getFieldNumber("o_int");
    int badFieldNumber = getFieldNumber("o_any_message");

    expectThat(diffMessage).ignoringFields(goodFieldNumber).isNotEqualTo(message);
    expectThat(diffMessage).ignoringFields(badFieldNumber).isEqualTo(diffMessage);

    expectFailureWhenTesting().that(diffMessage).ignoringFields(goodFieldNumber).isEqualTo(message);
    expectIsEqualToFailed();
    expectThatFailure().hasMessageThat().contains("deleted: o_any_message");

    expectFailureWhenTesting()
        .that(diffMessage)
        .ignoringFields(badFieldNumber)
        .isNotEqualTo(message);
    expectIsNotEqualToFailed();
    expectThatFailure().hasMessageThat().contains("ignored: o_any_message");
  }