public static String[] getStackFrames(final Throwable throwable) {
        if (throwable == null) {
            return new String[0];
        }
        return getStackFrames(getStackTrace(throwable));
    }
@Test
    void getStackFrames() {
        StackTraceElement[] traces = exception.getStackTrace();
        List<String> frames =
                Arrays.stream(traces).map(StackTraceElement::toString).collect(Collectors.toList());
        String str = ExceptionUtils.getStackFrameString(frames);
        List<String> stackFrames =
                Arrays.stream(ExceptionUtils.getStackFrames(str)).collect(Collectors.toList());
        Assertions.assertEquals(frames, stackFrames);
    }