public ProtoFluentAssertion ignoringFieldAbsence() {
    return usingConfig(config.ignoringFieldAbsence());
  }
@Test
  public void testIgnoringFieldAbsence() {
    Message message = parse("o_int: 3");
    Message diffMessage = parse("o_int: 3 o_enum: DEFAULT");

    // Make sure the implementation is reflexive.
    if (isProto3()) {
      expectThat(diffMessage).isEqualTo(message);
      expectThat(message).isEqualTo(diffMessage);
    } else {
      expectThat(diffMessage).isNotEqualTo(message);
      expectThat(message).isNotEqualTo(diffMessage);
    }
    expectThat(diffMessage).ignoringFieldAbsence().isEqualTo(message);
    expectThat(message).ignoringFieldAbsence().isEqualTo(diffMessage);

    if (!isProto3()) {
      Message customDefaultMessage = parse("o_int: 3");
      Message diffCustomDefaultMessage = parse("o_int: 3 o_long_defaults_to_42: 42");

      expectThat(diffCustomDefaultMessage).isNotEqualTo(customDefaultMessage);
      expectThat(diffCustomDefaultMessage).ignoringFieldAbsence().isEqualTo(customDefaultMessage);
      expectThat(customDefaultMessage).isNotEqualTo(diffCustomDefaultMessage);
      expectThat(customDefaultMessage).ignoringFieldAbsence().isEqualTo(diffCustomDefaultMessage);
    }

    if (!isProto3()) {
      expectFailureWhenTesting().that(diffMessage).isEqualTo(message);
      expectIsEqualToFailed();
      expectThatFailure().hasMessageThat().contains("added: o_enum: DEFAULT");
    }

    expectFailureWhenTesting().that(diffMessage).ignoringFieldAbsence().isNotEqualTo(message);
    expectIsNotEqualToFailed();
    expectThatFailure().hasMessageThat().contains("matched: o_int: 3");
    if (!isProto3()) {
      // Proto 3 doesn't cover the field at all when it's not set.
      expectThatFailure().hasMessageThat().contains("matched: o_enum: DEFAULT");
    }
  }