public static boolean hasCauseOf(Throwable t, Class<? extends Throwable> causeType) {
        return Throwables.getCausalChain(t)
                .stream()
                .anyMatch(c -> causeType.isAssignableFrom(c.getClass()));
    }
@Test
    public void hasCauseOf_returnsFalseIfNoCauseOfTheProvidedTypeFound() {
        assertThat(ExceptionUtils.hasCauseOf(
                new RuntimeException("parent", new RuntimeException("asdasd", new IllegalArgumentException())), IOException.class)).isFalse();
    }