assertEquals(ImmutableSet.of("jcr", "dummy"), ImmutableSet.copyOf(this.session.getNamespacePrefixes()));
assertEquals("http://mydummy", this.session.getNamespaceURI("dummy"));
assertEquals("dummy", this.session.getNamespacePrefix("http://mydummy"));
// test via namespace registry
NamespaceRegistry namespaceRegistry = this.session.getWorkspace().getNamespaceRegistry();
assertEquals(ImmutableSet.of("jcr", "dummy"), ImmutableSet.copyOf(namespaceRegistry.getPrefixes()));
assertEquals(ImmutableSet.of("http://www.jcp.org/jcr/1.0", "http://mydummy"),
ImmutableSet.copyOf(namespaceRegistry.getURIs()));
assertEquals("http://mydummy", namespaceRegistry.getURI("dummy"));
assertEquals("dummy", namespaceRegistry.getPrefix("http://mydummy"));
// remove dummy namespace
namespaceRegistry.unregisterNamespace("dummy");
assertEquals(ImmutableSet.of("jcr"), ImmutableSet.copyOf(this.session.getNamespacePrefixes()));
assertEquals("http://www.jcp.org/jcr/1.0", this.session.getNamespaceURI("jcr"));
assertEquals("jcr", this.session.getNamespacePrefix("http://www.jcp.org/jcr/1.0"));
}