@Test
public void shouldUseNamespacePrefixInResultFromGetStringWithNamespaceRegistry() {

    String result = name.getString(namespaceRegistry, encoder);
    assertThat(result, is("mode:" + validLocalName));
    validLocalName = "some:name:with:colons";
    name = new BasicName(validNamespaceUri, validLocalName);
    result = name.getString(namespaceRegistry, encoder);
    assertThat(result, is("mode:some%3aname%3awith%3acolons"));
}