@Test public void shouldPrintStacktracWithMessageAsString() { Exception e = new IllegalArgumentException( "wrong param" ); String msg = ConsoleLoggerUtils.toString( "issue", e ); StringWriter text = new StringWriter(); PrintWriter writer = new PrintWriter( text ); writer.println( "issue" ); e.printStackTrace( writer ); String s = text.toString(); assertThat( msg ) .isEqualTo( s ); }
public static String toString( Throwable t ) { return toString( null, t ); }
ConsoleLoggerUtils { public static String toString( Throwable t ) { return toString( null, t ); } }
ConsoleLoggerUtils { public static String toString( Throwable t ) { return toString( null, t ); } private  ConsoleLoggerUtils(); }
ConsoleLoggerUtils { public static String toString( Throwable t ) { return toString( null, t ); } private  ConsoleLoggerUtils(); static String toString( Throwable t ); static String toString( String message, Throwable t ); }
ConsoleLoggerUtils { public static String toString( Throwable t ) { return toString( null, t ); } private  ConsoleLoggerUtils(); static String toString( Throwable t ); static String toString( String message, Throwable t );  }