PicoException simpleException = new PicoException("Outer") {
};
ByteArrayOutputStream out = new ByteArrayOutputStream();
PrintStream printStream = new PrintStream(out);
nestedException.printStackTrace(printStream);
simpleException.printStackTrace(printStream);
out.close();
assertTrue(out.toString().indexOf("Caused by:") > 0);
out = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(out);
nestedException.printStackTrace(writer);