### Question:
URICommons { public static String[] splitNamespace(String uri) { String[] components = uri.split("#",2); String namespace, localName; if(components.length > 1) { namespace = components[0]+"#"; localName = components[1]; } else { components = uri.split("/"); if(components.length > 1) { namespace = uri.substring(0,uri.length()-components[components.length-1].length()); localName = components[components.length-1]; } else { components = uri.split(":"); namespace = uri.substring(0,uri.length()-components[components.length-1].length()); localName = components[components.length-1]; } } return new String[] {namespace,localName}; }  static String createCacheKey(URI node); static String createCacheKey(String uri); static String[] splitNamespace(String uri);  }### Answer:
@Test public void testSplitNamespace() { String[] split = URICommons.splitNamespace(uri_string); assertEquals(2, split.length); Assert.assertThat(split, equalTo(new String[] { prefix, local })); }