### Question:
StreamUtil { @SuppressWarnings(value = "DM_DEFAULT_ENCODING") public static String exceptionCallStack(final Throwable throwable) { final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); final PrintWriter printWriter = new PrintWriter(byteArrayOutputStream); throwable.printStackTrace(printWriter); printWriter.close(); return new String(byteArrayOutputStream.toByteArray(), StreamUtil.DEFAULT_CHARSET); } private  StreamUtil(); static String streamToString(final InputStream stream); static String streamToString(final InputStream stream, final boolean close); static String streamToString(final InputStream stream, final Charset charset); static String streamToString(final InputStream stream, final Charset charset, final boolean close); static Stream<String> streamToLines(final InputStream stream); static Stream<String> streamToLines(final InputStream stream, final Charset charset, final boolean close); static byte[] streamToBytes(final InputStream stream); static ByteArrayOutputStream streamToBuffer(final InputStream stream); static ByteArrayOutputStream streamToBuffer(final InputStream stream, final boolean close); static void stringToFile(final String string, final Path file); static void stringToFile(final String string, final Path file, final Charset charset); static void stringToStream(final String string, final OutputStream outputStream); static void stringToStream(final String string, final OutputStream outputStream, final Charset charset); static String fileToString(final Path file); static String fileToString(final Path file, final Charset charset); static void streamToFile(final InputStream inputStream, final String outputFileName); static void streamToFile(final InputStream inputStream, final Path file); static void copyFile(final Path fromFile, final Path toFile); static long streamToStream(final InputStream inputStream, final OutputStream outputStream); static InputStream stringToStream(final String string); static InputStream stringToStream(final String string, final Charset charset); static int eagerRead(final InputStream stream, final byte[] buffer); static long skip(final InputStream inputStream, final long totalBytesToSkip); static void fillBuffer(final InputStream stream, final byte[] buffer); static void fillBuffer(final InputStream stream, final byte[] buffer, final int offset, final int len); static OutputStream ignoreClose(final OutputStream outputStream); @SuppressWarnings(value = "DM_DEFAULT_ENCODING") static String exceptionCallStack(final Throwable throwable); static void close(final OutputStream outputStream); static void close(final InputStream inputStream); static ByteSlice getByteSlice(final String string); static final int BUFFER_SIZE; static final Charset DEFAULT_CHARSET; static final String DEFAULT_CHARSET_NAME; static final Locale DEFAULT_LOCALE; }### Answer:
@Test void testException() { try { throw new RuntimeException(); } catch (RuntimeException ex) { String callStack = StreamUtil.exceptionCallStack(ex); assertThat(callStack.contains("testException")).as(callStack).isTrue(); } }