@Deprecated
    @Override public void toXML(Object obj, OutputStream out) {
        super.toXML(obj, out);
    }
@Issue("JENKINS-21017")
    @Test
    public void unmarshalToDefault_default() {
        String defaultXml = "<hudson.util.XStream2Test_-WithDefaults>\n"
                + "  <stringDefaultValue>defaultValue</stringDefaultValue>\n"
                + "  <arrayDefaultValue>\n"
                + "    <string>first</string>\n"
                + "    <string>second</string>\n"
                + "  </arrayDefaultValue>\n"
                + "  <arrayDefaultEmpty/>\n"
                + "  <listDefaultValue>\n"
                + "    <string>first</string>\n"
                + "    <string>second</string>\n"
                + "  </listDefaultValue>\n"
                + "  <listDefaultEmpty/>\n"
                + "</hudson.util.XStream2Test_-WithDefaults>";

        WithDefaults existingInstance = new WithDefaults("foobar",
                "foobar",
                new String[]{"foobar", "barfoo", "fumanchu"},
                new String[]{"foobar", "barfoo", "fumanchu"},
                new String[]{"foobar", "barfoo", "fumanchu"},
                Arrays.asList("foobar", "barfoo", "fumanchu"),
                Arrays.asList("foobar", "barfoo", "fumanchu"),
                Arrays.asList("foobar", "barfoo", "fumanchu")
        );

        WithDefaults newInstance = new WithDefaults();

        String xmlA = Jenkins.XSTREAM2.toXML(fromXMLNullingOut(defaultXml, existingInstance));
        String xmlB = Jenkins.XSTREAM2.toXML(fromXMLNullingOut(defaultXml, newInstance));
        String xmlC = Jenkins.XSTREAM2.toXML(fromXMLNullingOut(defaultXml, null));

        assertThat("Deserializing over an existing instance is the same as with no root", xmlA, is(xmlC));
        assertThat("Deserializing over an new instance is the same as with no root", xmlB, is(xmlC));
    }