public void testCreateAttributeNS1() throws Throwable {
  String namespaceURI="http://www.ecommerce.org/";
  String malformedName="prefix::local";
  Document doc;
  doc=(Document)load("staffNS",builder);
{
    boolean success=false;
    try {
      doc.createAttributeNS(namespaceURI,malformedName);
    }
 catch (    DOMException ex) {
      success=(ex.code == DOMException.NAMESPACE_ERR);
    }
    assertTrue("throw_NAMESPACE_ERR",success);
  }
}

public void testCreateAttributeNS1 ( ) throws Throwable { String namespaceURI = "http://www.ecommerce.org/" ; String malformedName = "prefix::local" ; Document doc ; doc = ( Document ) load ( "staffNS" , builder ) ; { boolean success = false ; try { doc . createAttributeNS ( namespaceURI , malformedName ) ; } catch ( DOMException ex ) { success = ( ex . code == DOMException . NAMESPACE_ERR ) ; } assertTrue ( "throw_NAMESPACE_ERR" , success ) ; } }
runs the test case .
