StringWriter stringWriter = new StringWriter();
XMLEventWriter xmlEventWriter =
new IndentingXMLEventWriter(XMLOutputFactory.newInstance()
.createXMLEventWriter(stringWriter));
mjw.writeJournalEntry(journalEntry, xmlEventWriter);
long estimatedSize = estimator.estimateSize(journalEntry);
assertSizesAreReallyClose(stringWriter.getBuffer().length(),
estimatedSize);
}
}