XStringBuilder bufExpected = new XStringBuilder();
XStringBuilder bufActual = new XStringBuilder();
for (int i = 0; i < testData.length; i++)
{
String after = HTMLUtil.makeCharacterEntities(testData[i].before);
bufActual.reset(after);
bufActual.encodeMetacharacters();
bufExpected.reset(testData[i].after);
bufExpected.encodeMetacharacters();
bufBefore.reset(testData[i].before);
bufBefore.encodeMetacharacters();