public static FieldScope ignoringFields(int firstFieldNumber, int... rest) {
    return FieldScopeImpl.createIgnoringFields(asList(firstFieldNumber, rest));
  }
@Test
  public void testIgnoreSubMessageField() {
    Message message = parse("o_int: 1 o_sub_test_message: { o_int: 2 }");
    Message diffMessage = parse("o_int: 2 o_sub_test_message: { o_int: 2 }");
    Message eqMessage1 = parse("o_int: 1");
    Message eqMessage2 = parse("o_int: 1 o_sub_test_message: {}");
    Message eqMessage3 = parse("o_int: 1 o_sub_test_message: { o_int: 3 r_string: \"x\" }");
    int fieldNumber = getFieldNumber("o_sub_test_message");

    expectThat(diffMessage).ignoringFields(fieldNumber).isNotEqualTo(message);
    expectThat(eqMessage1).ignoringFields(fieldNumber).isEqualTo(message);
    expectThat(eqMessage2).ignoringFields(fieldNumber).isEqualTo(message);
    expectThat(eqMessage3).ignoringFields(fieldNumber).isEqualTo(message);

    expectFailureWhenTesting().that(diffMessage).ignoringFields(fieldNumber).isEqualTo(message);
    expectIsEqualToFailed();
    expectThatFailure().hasMessageThat().contains("modified: o_int: 1 -> 2");

    expectFailureWhenTesting().that(eqMessage3).ignoringFields(fieldNumber).isNotEqualTo(message);
    expectIsNotEqualToFailed();
    expectThatFailure().hasMessageThat().contains("ignored: o_sub_test_message");
  }