public void testUpdateAndGetQuotaClass() {
if (apiOption.isPresent()) {
QuotaClassApi api = apiOption.get();
QuotaClass firstVersion =
QuotaClassApiExpectTest.getTestQuotas().toBuilder()
.id("jcloudstestquotas")
.cores(10)
.instances(5)
.ram(4096)
.volumes(5)
.build();
assertTrue(api.update(firstVersion.getId(), firstVersion));
assertEquals(api.get(firstVersion.getId()), firstVersion);
// Change it again (since we may have run this test before and we can't delete the QuotaClass)
QuotaClass secondVersion = firstVersion.toBuilder().ram(8192).build();
assertTrue(api.update(secondVersion.getId(), secondVersion));
assertEquals(api.get(secondVersion.getId()), secondVersion);
}
}