CharsetEncoderUtil { public static CharsetEncoder getCharsetEncoder(String charsetName) { return getCharsetEncoder(charsetName, CodingErrorAction.REPLACE); }  static ByteBuffer encode(String charsetName, CharBuffer charBuffer); static ByteBuffer encode(
			String charsetName, CodingErrorAction codingErrorAction,
			CharBuffer charBuffer); static CharsetEncoder getCharsetEncoder(String charsetName); static CharsetEncoder getCharsetEncoder(
		String charsetName, CodingErrorAction codingErrorAction);  }
@Test public void testGetCharsetEncoder() { CharsetEncoder charsetEncoder = CharsetEncoderUtil.getCharsetEncoder( "UTF-8"); Assert.assertEquals(Charset.forName("UTF-8"), charsetEncoder.charset()); Assert.assertSame( CodingErrorAction.REPLACE, charsetEncoder.malformedInputAction()); Assert.assertSame( CodingErrorAction.REPLACE, charsetEncoder.unmappableCharacterAction()); }