@Test
public void testBuildWithQName() throws Exception {

    final NamespaceMappingRequest request = builder()
            .withQName(resolver.getQName("jcr:content"))
            .withQName(resolver.getQName("foo:folder"))
            .build();
    assertTrue("foo mapping is retained",
            request.resolveToJcrNs(mapping).stream().flatMap(Result::stream)
                    .anyMatch(inferTest1(NS_FOO::equals)));
    assertFalse("non-foo mappings are not retained",
            request.resolveToJcrNs(mapping).stream().flatMap(Result::stream)
                    .anyMatch(inferTest1(NS_FOO::equals).negate()));
}