jgen.close();
String encoded = sw.toString();
// ok, except need to remove surrounding quotes
encoded = encoded.substring(1, encoded.length() - 1);
byte[] expected = encoded.getBytes("UTF-8");
byte[] actual = encoder.quoteAsUTF8(str);
assertArrayEquals(expected, actual);
}
}
public void testEncodeAsUTF8() throws Exception