@Test
public void testBadId() throws IOException {

  LocatorIF base = new URILocator("http://example.com");
  TopicIF topic = builder.makeTopic();
  topic.addItemIdentifier(base.resolveAbsolute("#22"));
  
  String root = TestFileUtils.getTestdataOutputDirectory();
  TestFileUtils.verifyDirectory(root, testdataDirectory);
  String thebase = root + File.separator + testdataDirectory + File.separator;
  TestFileUtils.verifyDirectory(thebase, "out");
  File file = new File(thebase + File.separator + "out" + File.separator +
    "testBadId.ltm");
  
  new LTMTopicMapWriter(file).write(tm);
  tm = new LTMTopicMapReader(file).read();
  topic = (TopicIF) tm.getTopics().iterator().next();
  LocatorIF itemid = (LocatorIF) topic.getItemIdentifiers().iterator().next();
  Assert.assertTrue("Bad item ID was not filtered out",
             itemid.getAddress().endsWith("testBadId.ltm#id1"));
}