public void testCharsetEncoderCharsetfloatfloatbyteArray() {
byte[] ba = getLegalByteArray();
// normal case
CharsetEncoder ec = new MockCharsetEncoder(cs, 1, MAX_BYTES, ba);
assertSame(ec.charset(), cs);
assertEquals(1.0, ec.averageBytesPerChar(), 0.0);
assertTrue(ec.maxBytesPerChar() == MAX_BYTES);
assertSame(ba, ec.replacement());
/*
* ------------------------ Exceptional cases -------------------------