@@ -0,0 +1,668 @@
+package peergos.server.tests;%0A%0Aimport org.junit.*;%0A%0Apublic class Exceptions %7B%0A%0A%0A    @Test%0A    public void cause() %7B%0A        try %7B%0A            rethrows();%0A        %7D catch (Throwable t) %7B%0A            Throwable cause = peergos.shared.util.Exceptions.getRootCause(t);%0A            if (! (cause instanceof IllegalStateException))%0A                throw new IllegalStateException(%22Fail%22);%0A        %7D%0A    %7D%0A%0A    private static void rethrows() %7B%0A        try %7B%0A            throwsIllegal();%0A        %7D catch (Throwable t) %7B%0A            throw new RuntimeException(t);%0A        %7D%0A    %7D%0A%0A    private static void throwsIllegal() %7B%0A        throw new IllegalStateException(%22Bob%22);%0A    %7D%0A%7D%0A

Add test