/** Test get/set memoryTotal. */
  public void testMemoryTotal() {
    final DefaultVirtualMachine n = new DefaultVirtualMachine("V1", 1, 3, 1024);
    // Test default value
    Assert.assertEquals(n.getMemoryConsumption(), 1024);

    // Test the binding
    n.updateValue(DefaultVirtualMachine.MEMORY, 2048);
    Assert.assertEquals(n.getMemoryConsumption(), 2048);
  }
 /** Test the copy constructor and check if there is no side-effects. */
 public void testCopyConstructor() {
   final DefaultVirtualMachine n = new DefaultVirtualMachine("N1", 1, 3, 1024);
   n.setCPUNeed(15);
   final DefaultVirtualMachine n2 = new DefaultVirtualMachine(n);
   Assert.assertEquals(n2.getMemoryConsumption(), 1024);
   Assert.assertEquals(n2.getMemoryDemand(), 1024);
   Assert.assertEquals(n2.getNbOfCPUs(), 1);
   Assert.assertEquals(n2.getCPUConsumption(), 3);
   Assert.assertEquals(n2.getCPUDemand(), 15);
   n.updateValue(DefaultVirtualMachine.CPU_NB, 2);
   n.updateValue(DefaultVirtualMachine.MEMORY, 2048);
   n.updateValue(DefaultVirtualMachine.CPU_CONSUMPTION, 5);
   Assert.assertEquals(n2.getMemoryConsumption(), 1024);
   Assert.assertEquals(n2.getNbOfCPUs(), 1);
   Assert.assertEquals(n2.getCPUConsumption(), 3);
 }