public void testUpdateLimits() {
    limits.setCpuCountLimits(4, 5);
    limits.update();

    DatacentersLimitsDto limitsDto =
        env.enterpriseApi.getLimits(enterprise.unwrap(), env.datacenter.unwrap());
    assertNotNull(limitsDto);
    assertEquals(limitsDto.getCollection().size(), 1);
    assertEquals(limitsDto.getCollection().get(0).getCpuCountHardLimit(), 5);
    assertEquals(limitsDto.getCollection().get(0).getCpuCountSoftLimit(), 4);
  }
  public void testAllowTwiceWorks() {
    // Allow the datacenter again and check that the configuration has not
    // changed
    Limits limits = enterprise.allowDatacenter(env.datacenter);
    assertNotNull(limits);

    DatacentersLimitsDto limitsDto =
        env.enterpriseApi.getLimits(enterprise.unwrap(), env.datacenter.unwrap());
    assertNotNull(limitsDto);
    assertEquals(limitsDto.getCollection().size(), 1);
  }
  @BeforeClass
  public void setupEnterprise() {
    enterprise = Enterprise.Builder.fromEnterprise(env.enterprise).build();
    enterprise.setName(PREFIX + "-enterprise-test");
    enterprise.save();

    limits = enterprise.allowDatacenter(env.datacenter);
    assertNotNull(limits);

    DatacentersLimitsDto limitsDto =
        env.enterpriseApi.getLimits(enterprise.unwrap(), env.datacenter.unwrap());
    assertNotNull(limitsDto);
    assertEquals(limitsDto.getCollection().size(), 1);
  }