public static FieldScope fromSetFields(Message message) {
    return fromSetFields(
        message, AnyUtils.defaultTypeRegistry(), AnyUtils.defaultExtensionRegistry());
  }
@Test
  public void testFromSetFields_iterables_unionsElements() {
    Message message = parse("o_int: 1 r_string: \"foo\" r_string: \"bar\"");
    Message diffMessage1 = parse("o_int: 2 r_string: \"foo\" r_string: \"bar\"");
    Message diffMessage2 = parse("o_int: 4 r_string: \"baz\" r_string: \"qux\"");

    expectThat(listOf(message))
        .ignoringFieldScope(FieldScopes.fromSetFields(parse("o_int: 1"), parse("o_enum: TWO")))
        .containsExactly(diffMessage1);

    expectFailureWhenTesting()
        .that(listOf(message))
        .ignoringFieldScope(FieldScopes.fromSetFields(parse("o_int: 1"), parse("o_enum: TWO")))
        .containsExactly(diffMessage2);
    expectThatFailure().isNotNull();
  }