}
@Test(groups = { "live", "user" }, description = "PUT /vApp/{id}/productSections", dependsOnMethods = { "testGetProductSections" })
public void testEditProductSections() {
// Copy existing section and edit fields
ProductSectionList oldSections = vAppApi.getProductSections(vAppUrn);
ProductSectionList newSections = oldSections
.toBuilder()
.productSection(
ProductSection.builder().info("Information about the installed software")
// Default ovf:Info text
.required().product(MsgType.builder().value("jclouds").build())
.vendor(MsgType.builder().value("jclouds Inc.").build())
// NOTE other ProductSection elements not returned by vCloud
.build()).build();
// The method under test
Task editProductSections = vAppApi.editProductSections(vAppUrn, newSections);
assertTrue(retryTaskSuccess.apply(editProductSections),
String.format(TASK_COMPLETE_TIMELY, "editProductSections"));
// Retrieve the modified section
ProductSectionList modified = vAppApi.getProductSections(vAppUrn);
// Check the retrieved object is well formed
checkProductSectionList(modified);
// Check the modified object has an extra ProductSection
assertEquals(modified.getProductSections().size(), oldSections.getProductSections().size() + 1);
// Check the section was modified correctly
assertEquals(modified, newSections);
}