checkResourceAllocationSettingData(rasd);
}
@Test(description = "PUT /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSectionMemory" })
public void testEditVirtualHardwareSectionMemory() {
RasdItem origItem = vmApi.getVirtualHardwareSectionMemory(vmUrn);
RasdItem newItem = origItem.toBuilder().elementName("1024 MB of memory").virtualQuantity(new BigInteger("1024"))
.build();
// Method under test
Task editVirtualHardwareSectionMemory = vmApi.editVirtualHardwareSectionMemory(vmUrn, newItem);
assertTrue(retryTaskSuccess.apply(editVirtualHardwareSectionMemory),
String.format(TASK_COMPLETE_TIMELY, "editVirtualHardwareSectionMemory"));
// Retrieve the modified section
RasdItem modified = vmApi.getVirtualHardwareSectionMemory(vmUrn);
// Check the retrieved object
checkResourceAllocationSettingData(modified);
// Check modified item
assertEquals(modified.getVirtualQuantity(), new BigInteger("1024"), String.format(OBJ_FIELD_EQ,
"ResourceAllocationSettingData", "VirtualQuantity", "1024", modified.getVirtualQuantity().toString()));
assertEquals(modified, newItem);
}