/** Test generateStackTrace(). */
// Just spot-check, since it's hard to confirm the exact output
@Test public void testGenerateStackTrace() {
assertEquals(null, GwtExceptionUtils.generateStackTrace(null));
CedarRuntimeException e = new CedarRuntimeException();
assertNotNull(GwtExceptionUtils.generateStackTrace(e));
e.setContext(new ExceptionContext());
assertNotNull(GwtExceptionUtils.generateStackTrace(e));
e.getContext().setStackTrace("X");
assertEquals("X", GwtExceptionUtils.generateStackTrace(e));
assertNotNull(GwtExceptionUtils.generateStackTrace(new Exception("whatever")));
assertNotNull(GwtExceptionUtils.generateStackTrace(new Exception("whatever", new Exception("cause"))));
}