HttpServletResponse response = mock(HttpServletResponse.class);
when(response.getWriter()).thenReturn(new PrintWriter(stream));
final DefaultTypeNameExtractor extractor = new DefaultTypeNameExtractor();
this.serialization = new XStreamXMLSerialization(response, extractor, new NullProxyInitializer(), new XStreamBuilderImpl(
new XStreamConverters(Collections.<Converter>emptyList(), Collections.<SingleValueConverter>emptyList()),
extractor) {
@Override
public XStream xmlInstance() {
return configure(new XStream() {