@Deprecated
    @Override public void toXML(Object obj, OutputStream out) {
        super.toXML(obj, out);
    }
@Issue("JENKINS-21017")
    @Test
    public void unmarshalToDefault_empty() {
        String emptyXml = "<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();

        Object reloaded = fromXMLNullingOut(emptyXml, existingInstance);
        assertSame(existingInstance, reloaded);
        String xmlA = Jenkins.XSTREAM2.toXML(reloaded);
        String xmlB = Jenkins.XSTREAM2.toXML(fromXMLNullingOut(emptyXml, newInstance));
        String xmlC = Jenkins.XSTREAM2.toXML(fromXMLNullingOut(emptyXml, 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));
    }