public static FieldScope allowingFields(int firstFieldNumber, int... rest) {
    return FieldScopeImpl.createAllowingFields(asList(firstFieldNumber, rest));
  }
@Test
  public void testMultipleFieldNumbers() {
    Message message = parse("o_int: 1 r_string: \"x\" o_enum: TWO");
    Message diffMessage = parse("o_int: 2 r_string: \"y\" o_enum: TWO");
    Message eqMessage =
        parse("o_int: 1 r_string: \"x\" o_enum: ONE o_sub_test_message: { r_string: \"bar\" }");

    FieldScope fieldScope =
        FieldScopes.allowingFields(getFieldNumber("o_int"), getFieldNumber("r_string"));

    expectThat(diffMessage).withPartialScope(fieldScope).isNotEqualTo(message);
    expectThat(eqMessage).withPartialScope(fieldScope).isEqualTo(message);

    expectFailureWhenTesting().that(diffMessage).withPartialScope(fieldScope).isEqualTo(message);
    expectIsEqualToFailed();
    expectThatFailure().hasMessageThat().contains("modified: o_int: 1 -> 2");
    expectThatFailure().hasMessageThat().contains("modified: r_string[0]: \"x\" -> \"y\"");

    expectFailureWhenTesting().that(eqMessage).withPartialScope(fieldScope).isNotEqualTo(message);
    expectIsNotEqualToFailed();
    expectThatFailure().hasMessageThat().contains("ignored: o_enum");
    expectThatFailure().hasMessageThat().contains("ignored: o_sub_test_message");
  }