	@Test
	public void testAnyOf() {

		A top=new A("a",new B("b",new D("d",new B("root"))));
		
		Throwable anyCauseOf = Exceptions.anyCauseOf(top,B.class);
		
		Assert.assertEquals("type", B.class,anyCauseOf.getClass());
		Assert.assertEquals("message", "b",anyCauseOf.getMessage());
		
		anyCauseOf = Exceptions.anyCauseOf(top,C.class);
		
		Assert.assertNull(anyCauseOf);

		anyCauseOf = Exceptions.anyCauseOf(top,A.class);
		
		Assert.assertEquals("type", A.class,anyCauseOf.getClass());
		Assert.assertEquals("message", "a",anyCauseOf.getMessage());
	}