### Question:
SAXEventUtils { public static String renameQName( String oldQName, String newLocalName ) { return PATTERN.matcher( oldQName ).replaceFirst( newLocalName ); } private  SAXEventUtils(); static String renameQName( String oldQName, String newLocalName );  }### Answer:
@Test public void replaceWithNamespace() { assertThat( SAXEventUtils.renameQName( "org:bar", "com" ), is( "org:com" ) ); }
@Test public void replaceWithoutNamespace() { assertThat( SAXEventUtils.renameQName( "bar", "com" ), is( "com" ) ); }