PrefixLib { public static String expand(PrefixMapI prefixes, String prefixedName) { int i = prefixedName.indexOf(':'); if ( i < 0 ) return null; return expand(prefixes, prefixedName.substring(0, i), prefixedName.substring(i + 1)); }  static String canonicalPrefix(String prefix); static Node canonicalGraphName(Node graphName); static boolean isNodeDefaultGraph(Node graphName); static String abbreviate(PrefixMapI pmap, String uriStr); static Pair<String, String> abbrev(PrefixMapI prefixes, String uriStr); static String expand(PrefixMapI prefixes, String prefixedName); static String expand(PrefixMapI prefixes, String prefix, String localName); boolean isSafeLocalPart(String localName);  }
@Test public void expand_1() { PrefixMapI prefixes = create(); prefixes.add(pref1, "http: String x = PrefixLib.expand(prefixes, "pref1:abc"); assertEquals("http: String x2 = PrefixLib.expand(prefixes, "pref1z:abc"); assertNull(x2); }
@Test public void expand_2() { PrefixMapI prefixes = create(); prefixes.add(pref1, "http: String x2 = PrefixLib.expand(prefixes, "pref1z:abc"); assertNull(x2); }