public void testSetPrefix() throws Exception {
public void testSetPrefix(String prefix) throws Exception { XmlSerializer ser = factory.newSerializer(); StringWriter sw = new StringWriter(); ser.setOutput(sw); final String NS = "http: ser.setPrefix(prefix, NS); ser.startTag(NS, "foo"); ser.endDocument();
    public void testSetPrefix() throws Exception {        //TODO check redeclaring defult namespace        checkTestSetPrefixSoap(SOAP12);        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m"));        checkTestSetPrefixSoap(generateSoapEnvelope(null, null, "m"));        checkTestSetPrefixSoap(generateSoapEnvelope("env", null, "m"));        checkTestSetPrefixSoap(generateSoapEnvelope("env", "", ""));        String generated = generateSoapEnvelope("", "n", "m");        //System.err.println(getClass()+" generated="+generated);        // 1 is for one extra namespace must be added to declare xmlns namespace        //    for attrbute mustUnderstan in SOAP-ENV namespace        checkTestSetPrefixSoap(generated, 1,false);        checkTestSetPrefixSoap(generateSoapEnvelope("", null, "m"),1,false);        //check optional pretty printing        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", Boolean.FALSE, null, null));        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", Boolean.TRUE, null, null));        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", null, " ", null), true);        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", null, "\t", null), true);        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", null, "    ", null), true);        String s = generateSoapEnvelope("env", "n", "m", Boolean.TRUE, " ", "\n");        //System.out.println(getClass()+" envelope="+generateSoapEnvelope("", "n", "m"));        checkTestSetPrefixSoap(s, true);    }