@Test
public void testTier() throws Exception {

    Integer minimum = new Integer(1);
    Integer initial = new Integer(2);
    Integer maximum = new Integer(1);
    Tier tier = new Tier("tier", maximum, minimum, initial, null, "2", "image", "icono", "keypair", "yes", null);
    tier.setRegion("regionOne");
    SecurityGroup securityGroup = new SecurityGroup("nanme", "description");
    /*securityGroup.addRule(new Rule("ipProtocol", "fromPort", "toPort", "sourceGroup", "cidr"));
    tier.setSecurityGroup(securityGroup);*/
    TierDto tierDto = tier.toDto();
    Tier tier3 = tierDto.fromDto("vdc", "env");
   // assertEquals(tier.getSecurityGroup().getRules().size(), 1);
    assertEquals(tier.getInitialNumberInstances(), initial);
    assertEquals(tier.getMaximumNumberInstances(), maximum);
    assertEquals(tier.getMinimumNumberInstances(), minimum);
    assertEquals(tier3.equals(tier), true);
}