@Test
    public void WhenUpdatingWithNullHostAndRefmaxLesserThanLevelSize_ExpectReducedLevelSize() throws UnknownHostException {
        RoutingTable routingTable = new RoutingTable();
        localhost_.setHostPath("0");
        routingTable.setLocalhost(localhost_);
        PGridHost aHost = new PGridHost("127.0.0.1", 3333);
        PGridHost anotherHost = new PGridHost("127.0.0.1", 4444);
        routingTable.addReference(0, aHost);
        routingTable.addReference(0, anotherHost);
        int refMax = routingTable.getLevel(0).size() - 1;
        routingTable.updateLevelRandomly(0, null, refMax);

        Assert.assertTrue(routingTable.levelNumber() == 1);
        Assert.assertTrue(routingTable.getLevel(0).size() == refMax);
        Assert.assertTrue(routingTable.getLevel(0).contains(aHost) || routingTable.getLevel(0).contains(anotherHost));
        Assert.assertFalse(routingTable.getLevel(0).contains(aHost) && routingTable.getLevel(0).contains(anotherHost));
    }