@Test public void getSlaTest() throws Exception { JAXBContext jaxbContext = JAXBContext.newInstance(SLA.class); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); SLA slaAgreement = (SLA) jaxbUnmarshaller.unmarshal(new StringReader(slaTemplateString)); assertNotNull(slaAgreement); assertEquals(6, slaAgreement.getAgreementTerms().size()); AgreementTerm agreementTerm1 = slaAgreement.getAgreementTerms().get(0); assertEquals("jmeter_Guarantees", agreementTerm1.getId()); AgreementTerm agreementTerm4 = slaAgreement.getAgreementTerms().get(1); assertEquals("mysql_Guarantees", agreementTerm4.getId()); AgreementTerm agreementTerm5 = slaAgreement.getAgreementTerms().get(2); assertEquals("Infrastructure_Price_Of_jmeter", agreementTerm5.getId()); assertNotNull(agreementTerm5.getGuaranteed()); assertNotNull(agreementTerm5.getGuaranteed().getAction()); assertNotNull(agreementTerm5.getGuaranteed().getAction().getPostCondition()); assertNotNull(agreementTerm5.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice()); assertEquals("Product_Offering_Price_Of_jmeter", agreementTerm5.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getId()); assertNotNull(agreementTerm5.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getPrice()); assertNotNull(agreementTerm5.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getQuantity()); assertEquals(0.0, agreementTerm5.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getPrice().getValue(), 0.0001); assertEquals("http: agreementTerm5.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getPrice().getDatatype()); assertEquals(1l,agreementTerm5.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getQuantity().getValue(), 0.0001); assertEquals("http: agreementTerm5.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getQuantity().getDatatype()); AgreementTerm agreementTerm8 = slaAgreement.getAgreementTerms().get(5); assertEquals("Infrastructure_Price_Of_mysql", agreementTerm8.getId()); assertNotNull(agreementTerm8.getGuaranteed()); assertNotNull(agreementTerm8.getGuaranteed().getAction()); assertNotNull(agreementTerm8.getGuaranteed().getAction().getPostCondition()); assertNotNull(agreementTerm8.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice()); assertEquals("Product_Offering_Price_Of_mysql", agreementTerm8.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getId()); assertNotNull(agreementTerm8.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getPrice()); assertNotNull(agreementTerm8.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getQuantity()); assertEquals(0.0, agreementTerm8.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getPrice().getValue(), 0.0001); assertEquals("http: agreementTerm8.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getPrice().getDatatype()); assertEquals(1l,agreementTerm8.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getQuantity().getValue(), 0.0001); assertEquals("http: agreementTerm8.getGuaranteed().getAction().getPostCondition().getProductOfferingPrice().getComponentProdOfferingPrice().getQuantity().getDatatype()); }
public List<AgreementTerm> getAgreementTerms() { return agreementTerms; }
SLA { public List<AgreementTerm> getAgreementTerms() { return agreementTerms; } }
SLA { public List<AgreementTerm> getAgreementTerms() { return agreementTerms; }  }
SLA { public List<AgreementTerm> getAgreementTerms() { return agreementTerms; }  String getUuid(); void setUuid(String uuid); List<AgreementTerm> getAgreementTerms(); void setAgreementTerms(List<AgreementTerm> agreementTerms); Properties getProperties(); void setProperties(Properties properties); }
SLA { public List<AgreementTerm> getAgreementTerms() { return agreementTerms; }  String getUuid(); void setUuid(String uuid); List<AgreementTerm> getAgreementTerms(); void setAgreementTerms(List<AgreementTerm> agreementTerms); Properties getProperties(); void setProperties(Properties properties);  }