  @Test
  public void testIncrementNodeCapacityUnderCapacity() throws Exception {

    resetNodeTotalCapability(nodeOne, 0, 0);
    resetNodeTotalCapability(nodeTwo, 2, 512);
    Offer offerOne = TestObjectFactory.getOffer("localhost-one", "slave-one", "mock", "offer-one", 1.0, 512.0);
    Offer offerTwo = TestObjectFactory.getOffer("localhost-two", "slave-two", "mock", "offer-two", 3.0, 1024.0);
    olManager.addOffers(offerOne);
    olManager.addOffers(offerTwo);
        
    RMNodeStatusEvent eventOne = getRMStatusEvent(nodeOne);
    handler.beforeRMNodeEventHandled(eventOne, context);
    RMNodeStatusEvent eventTwo = getRMStatusEvent(nodeTwo);
    handler.beforeRMNodeEventHandled(eventTwo, context);
    
    assertEquals(512, nodeOne.getTotalCapability().getMemory());
    assertEquals(1, nodeOne.getTotalCapability().getVirtualCores());
    assertEquals(1024, nodeTwo.getTotalCapability().getMemory());
    assertEquals(3, nodeTwo.getTotalCapability().getVirtualCores());
  }