@@ -0,0 +1,3369 @@
+package by.binarylifestyle.exception.wrapper.test;%0A%0Aimport by.binarylifestyle.exception.wrapper.impl.support.WrappingConfiguration;%0Aimport by.binarylifestyle.exception.wrapper.test.exception.dao.UncheckedDaoException;%0Aimport by.binarylifestyle.exception.wrapper.test.exception.dao.UncheckedSpecificDaoException;%0Aimport by.binarylifestyle.exception.wrapper.test.exception.serivce.UncheckedServiceException;%0Aimport by.binarylifestyle.exception.wrapper.test.exception.thirdparty.UncheckedThirdPartyException;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Apublic class WrappingConfigurationTests %7B%0A    @Test%0A    public void canWrapEqualTypesTest() %7B%0A        WrappingConfiguration%3CUncheckedDaoException, UncheckedServiceException%3E configuration =%0A                new WrappingConfiguration%3C%3E(UncheckedDaoException.class, UncheckedServiceException::new);%0A        Exception exception = new UncheckedDaoException();%0A        Assert.assertTrue(configuration.canWrap(exception));%0A    %7D%0A%0A    @Test%0A    public void canWrapSubclassTest() %7B%0A        WrappingConfiguration%3CUncheckedDaoException, UncheckedServiceException%3E configuration =%0A                new WrappingConfiguration%3C%3E(UncheckedDaoException.class, UncheckedServiceException::new);%0A        Exception exception = new UncheckedSpecificDaoException();%0A        Assert.assertTrue(configuration.canWrap(exception));%0A    %7D%0A%0A    @Test%0A    public void canWrapIncompatibleTypesTest() %7B%0A        WrappingConfiguration%3CUncheckedDaoException, UncheckedServiceException%3E configuration =%0A                new WrappingConfiguration%3C%3E(UncheckedDaoException.class, UncheckedServiceException::new);%0A        Exception exception = new UncheckedThirdPartyException();%0A        Assert.assertFalse(configuration.canWrap(exception));%0A    %7D%0A%0A    @Test%0A    public void wrapEqualTypesTest() %7B%0A        WrappingConfiguration%3CUncheckedDaoException, UncheckedServiceException%3E configuration =%0A                new WrappingConfiguration%3C%3E(UncheckedDaoException.class, UncheckedServiceException::new);%0A        Exception exception = new UncheckedDaoException();%0A        UncheckedServiceException wrappedException = configuration.wrap(exception);%0A        Assert.assertEquals(UncheckedServiceException.class, wrappedException.getClass());%0A        Assert.assertEquals(UncheckedDaoException.class, wrappedException.getCause().getClass());%0A    %7D%0A%0A    @Test%0A    public void wrapSubclassTest() %7B%0A        WrappingConfiguration%3CUncheckedDaoException, UncheckedServiceException%3E configuration =%0A                new WrappingConfiguration%3C%3E(UncheckedDaoException.class, UncheckedServiceException::new);%0A        Exception exception = new UncheckedSpecificDaoException();%0A        UncheckedServiceException wrappedException = configuration.wrap(exception);%0A        Assert.assertEquals(UncheckedServiceException.class, wrappedException.getClass());%0A        Assert.assertEquals(UncheckedSpecificDaoException.class, wrappedException.getCause().getClass());%0A    %7D%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void wrapIncompatibleTypesTest() %7B%0A        WrappingConfiguration%3CUncheckedDaoException, UncheckedServiceException%3E configuration =%0A                new WrappingConfiguration%3C%3E(UncheckedDaoException.class, UncheckedServiceException::new);%0A        Exception exception = new UncheckedThirdPartyException();%0A        configuration.wrap(exception);%0A    %7D%0A%7D%0A

Add tests for WrappingConfiguration