Code example for SocketTimeoutException

0
     * Test of chain method, of class ExceptionChain. 
     */ 
    @Test 
    public void testChain() { 
        System.out.println("chain");
        Throwable t = new RuntimeException("", new SocketTimeoutException("Boo timeout"));
        Throwable newRootCause = new TimeoutException("Booo");
        Throwable result = ExceptionChain.chain(t, newRootCause);
        result.printStackTrace();
        Assert.assertEquals(newRootCause, Throwables.getRootCause(result));
        Assert.assertEquals(3, Throwables.getCausalChain(result).size());
         
    } 
}