@Test
    public void WhenUpdatingCollection_ExpectContainedSizeChange()
            throws UnknownHostException {
        int tableLevel = localhost_.getHostPath().length();
        RoutingTable table = new RoutingTable();
        table.setLocalhost(localhost_);
        Assert.assertTrue(table.levelNumber() == tableLevel);
        Assert.assertTrue(table.uniqueHostsNumber() == 0);

        Host oldHost0 = new PGridHost("127.0.0.1", 1000);
        Host oldHost1 = new PGridHost("127.0.0.1", 1001);
        Collection<Host> oldList = new ArrayList<Host>(2);
        oldList.add(oldHost0);
        oldList.add(oldHost1);
        table.addReference(0, oldList);

        Host newHost0 = new PGridHost("127.0.0.1", 3000);
        Host newHost1 = new PGridHost("127.0.0.1", 3001);
        Collection<Host> newList = new ArrayList<Host>(2);
        newList.add(newHost0);
        newList.add(newHost1);

        table.updateLevel(0, newList);

        Assert.assertTrue(table.levelNumber() == tableLevel);
        Collection<Host> zeroLevel = table.getLevel(0);
        Assert.assertTrue(zeroLevel.contains(oldHost0) &&
                zeroLevel.contains(oldHost1) &&
                zeroLevel.contains(newHost0) &&
                zeroLevel.contains(newHost1));
        Assert.assertTrue(table.uniqueHostsNumber() == 4);
    }