@@ -0,0 +1,1944 @@
+package uk.co.benjiweber.expressions;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static uk.co.benjiweber.expressions.Exceptions.unchecked;%0A%0Apublic class ExceptionsTest %7B%0A    @Test%0A    public void checked_to_unchecked() %7B%0A        String foo = unchecked(() -%3E Example.methodThatThrowsCheckedException(DO_NOT_THROW));%0A        assertEquals(%22foo%22, foo);%0A    %7D%0A%0A    @Test%0A    public void checked_to_unchecked_method_reference() %7B%0A        unchecked(Example::methodThatThrowsCheckedExceptionNoParams);%0A    %7D%0A%0A    @Test%0A    public void checked_to_unchecked_void() %7B%0A        unchecked(() -%3E Example.voidMethodThatThrowsACheckedException(DO_NOT_THROW));%0A    %7D%0A%0A    @Test(expected = RuntimeException.class)%0A    public void checked_to_unchecked_should_wrap_in_runtime_exception() %7B%0A        String foo = unchecked(() -%3E Example.methodThatThrowsCheckedException(THROW));%0A    %7D%0A%0A    @Test(expected = RuntimeException.class)%0A    public void checked_to_unchecked_void_should_wrap_in_runtime_exception() %7B%0A        unchecked(() -%3E Example.voidMethodThatThrowsACheckedException(THROW));%0A    %7D%0A%0A    static class ACheckedExceptionIDontHaveAGoodWayToDealWith extends Exception %7B%0A%0A    %7D%0A%0A    static boolean THROW = true;%0A    static boolean DO_NOT_THROW = false;%0A%0A%0A    static class Example %7B%0A        public static String methodThatThrowsCheckedException(boolean throwPlease) throws ACheckedExceptionIDontHaveAGoodWayToDealWith %7B%0A            if (throwPlease) throw new ACheckedExceptionIDontHaveAGoodWayToDealWith();%0A            return %22foo%22;%0A        %7D%0A%0A        public static void voidMethodThatThrowsACheckedException(boolean throwPlease) throws ACheckedExceptionIDontHaveAGoodWayToDealWith %7B%0A            if (throwPlease) throw new ACheckedExceptionIDontHaveAGoodWayToDealWith();%0A        %7D%0A%0A        public static void methodThatThrowsCheckedExceptionNoParams() throws ACheckedExceptionIDontHaveAGoodWayToDealWith %7B%0A%0A        %7D%0A    %7D%0A%0A%0A%7D%0A

Add test to illustrate exception wrapping