@Test
public void testImmutable() throws CloneNotSupportedException {

    HttpHost[] proxies = new HttpHost[]{ PROXY1, PROXY2, PROXY3 };
    HttpRoute route1 = new HttpRoute(TARGET1, null, proxies, false,
                                     TunnelType.PLAIN, LayerType.PLAIN);
    HttpRoute route2 = (HttpRoute) route1.clone();
    HttpRoute route3 = new HttpRoute(TARGET1, null,
                                     proxies.clone(), false,
                                     TunnelType.PLAIN, LayerType.PLAIN);
    // modify the array that was passed to the constructor of route1
    proxies[1] = PROXY3;
    proxies[2] = PROXY2;
    Assert.assertEquals("route differs from clone", route2, route1);
    Assert.assertEquals("route was modified", route3, route1);
}