ExceptionUtils { public static StackTraceElement[] concat(final StackTraceElement[] left, final StackTraceElement[] right) { final StackTraceElement[] ret = new StackTraceElement[left.length + right.length]; System.arraycopy(left, 0, ret, 0, left.length); System.arraycopy(right, 0, ret, left.length, right.length); return ret; }  static String buildExceptionMessage(
      final String message,
      final Throwable cause); static String trace(); static String trace(
      final StackTraceElement[] elements); static String trace(
      final StackTraceElement[] elements,
      final int start,
      final int end); static String getStackTraceOf(
      final Throwable e); static StackTraceElement[] concat(final StackTraceElement[] left,
      final StackTraceElement[] right);  }
@Test public void testConcat() { final StackTraceElement[] left = new Throwable().getStackTrace(); final StackTraceElement[] right = new Throwable().getStackTrace(); final StackTraceElement[] expected = Arrays.copyOf(left, left.length + right.length); System.arraycopy(right, 0, expected, left.length, right.length); assertTrue(Arrays.equals(expected, ExceptionUtils.concat(left, right))); }