public void hasAllRequiredFields() {
    if (!actual.isInitialized()) {
      // MessageLite doesn't support reflection so this is the best we can do.
      failWithoutActual(
          simpleFact("expected to have all required fields set"),
          fact("but was", actualCustomStringRepresentationForProtoPackageMembersToCall()),
          simpleFact("(Lite runtime could not determine which fields were missing.)"));
    }
  }
@Test
  public void testHasAllRequiredFields_failures() {
    if (!config.messageWithoutRequiredFields().isPresent()) {
      return;
    }

    AssertionError e =
        expectFailure(
            whenTesting ->
                whenTesting
                    .that(config.messageWithoutRequiredFields().get())
                    .hasAllRequiredFields());
    expectRegex(
        e,
        "expected to have all required fields set\\s*but was: .*\\(Lite runtime could not"
            + " determine which fields were missing.\\)");
  }