@Test
public void testUnmappableInputActionReplace() throws Exception {
final String s = "This text contains a circumflex \u0302 !!!";
final CharsetEncoder encoder = Consts.ISO_8859_1.newEncoder();
encoder.onMalformedInput(CodingErrorAction.IGNORE);
encoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
final SessionOutputBufferMock outbuf = new SessionOutputBufferMock(encoder);
outbuf.writeLine(s);
outbuf.flush();
final String result = new String(outbuf.getData(), "ISO-8859-1");
Assert.assertEquals("This text contains a circumflex ? !!!\r\n", result);