assertThat(namespaceRegistry.getPrefixForNamespaceUri(validNamespaceUri3, false), is(""));
assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));
assertThat(namespaceRegistry.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));
assertThat(namespaceRegistry.getNamespaceForPrefix(""), is(validNamespaceUri3));
NamespaceRegistry newRegistry = new SimpleNamespaceRegistry();
for (String uri : this.namespaceRegistry.getRegisteredNamespaceUris()) {
String prefix = this.namespaceRegistry.getPrefixForNamespaceUri(uri, false);
newRegistry.register(prefix, uri);
}
assertThat(newRegistry.isRegisteredNamespaceUri(validNamespaceUri1), is(true));
assertThat(newRegistry.isRegisteredNamespaceUri(validNamespaceUri2), is(true));
assertThat(newRegistry.isRegisteredNamespaceUri(validNamespaceUri3), is(true));
assertThat(newRegistry.getPrefixForNamespaceUri(validNamespaceUri1, false), is(validPrefix1));
assertThat(newRegistry.getPrefixForNamespaceUri(validNamespaceUri2, false), is(validPrefix2));
assertThat(newRegistry.getPrefixForNamespaceUri(validNamespaceUri3, false), is(""));
assertThat(newRegistry.getNamespaceForPrefix(validPrefix1), is(validNamespaceUri1));
assertThat(newRegistry.getNamespaceForPrefix(validPrefix2), is(validNamespaceUri2));
assertThat(newRegistry.getNamespaceForPrefix(""), is(validNamespaceUri3));
}