IdentityUtils { public static LocatorIF getSymbolicIdLocator(TopicMapIF topicmap, String symbolicId) { LocatorIF base = topicmap.getStore().getBaseAddress(); if (base != null) return base.resolveAbsolute('#' + symbolicId); else return null; }  static TMObjectIF getObjectBySymbolicId(TopicMapIF topicmap, String symbolicId); static LocatorIF getSymbolicIdLocator(TopicMapIF topicmap, String symbolicId); static Collection<TopicIF> findSameTopic(TopicMapIF topicmap, TopicIF topic);  }
@Test public void testGetSymbolicIdLocator() { String symbolicId = "foo"; LocatorIF base = topicmap.getStore().getBaseAddress(); LocatorIF loc = base.resolveAbsolute("#" + symbolicId); LocatorIF loc2 = IdentityUtils.getSymbolicIdLocator(topicmap, symbolicId); Assert.assertEquals("Symbolic locators not equal", loc, loc2); }