SaxParserFactory { public static SAXParser createParser() { try { return SAXParserFactory.newInstance().newSAXParser(); } catch (ParserConfigurationException e) { throw new OsmosisRuntimeException("Unable to create SAX Parser.", e); } catch (SAXException e) { throw new OsmosisRuntimeException("Unable to create SAX Parser.", e); } } private  SaxParserFactory(); static SAXParser createParser();  }
@Test public void testCreateParser() { SAXParser parser = SaxParserFactory.createParser(); Assert.assertNotNull("Parser was not created", parser); }