### Question:
IOUtils { @VisibleForAdvice public static CoderResult decodeUtf8Byte(final byte b, final CharBuffer charBuffer) { final ByteBuffer buffer = threadLocalByteBuffer.get(); buffer.put(b); ((Buffer) buffer).position(0); ((Buffer) buffer).limit(1); return decode(charBuffer, buffer); }  @VisibleForAdvice static boolean readUtf8Stream(final InputStream is, final CharBuffer charBuffer); @VisibleForAdvice static CoderResult decodeUtf8Bytes(final byte[] bytes, final CharBuffer charBuffer); @VisibleForAdvice static CoderResult decodeUtf8Bytes(final byte[] bytes, final int offset, final int length, final CharBuffer charBuffer); @VisibleForAdvice static CoderResult decodeUtf8Byte(final byte b, final CharBuffer charBuffer); static synchronized File exportResourceToDirectory(String resource, String parentDirectory, String tempFileNamePrefix,
                                                              String tempFileNameExtension); static String md5Hash(InputStream resourceAsStream);  }### Answer:
@Test void readUtf8Byte() { final CharBuffer charBuffer = CharBuffer.allocate(8); for (byte b : "{foo}".getBytes(UTF_8)) { assertThat(IOUtils.decodeUtf8Byte(b, charBuffer).isError()).isFalse(); } charBuffer.flip(); assertThat(charBuffer.toString()).isEqualTo("{foo}"); }