@Test public void testGenerateGetAgreement() throws Exception { server.enqueue(new MockResponse(). setBody(readFile("/eu/seaclouds/planner/core/application/agreements/sla-create-agreement-response.xml"))); server.start(); URL url = server.url("/").url(); AgreementGenerator generator = new AgreementGenerator(url.toString()); String result = generator.getAgreement("templateId"); assertNotNull(result); }
public String getAgreement(String applicationMonitorId) { List<NameValuePair> paremeters = MutableList.of((NameValuePair) new BasicNameValuePair("templateId", applicationMonitorId)); return new HttpHelper(slaUrl).getRequest(GET_AGREEMENT_OP, paremeters); }
AgreementGenerator { public String getAgreement(String applicationMonitorId) { List<NameValuePair> paremeters = MutableList.of((NameValuePair) new BasicNameValuePair("templateId", applicationMonitorId)); return new HttpHelper(slaUrl).getRequest(GET_AGREEMENT_OP, paremeters); } }
AgreementGenerator { public String getAgreement(String applicationMonitorId) { List<NameValuePair> paremeters = MutableList.of((NameValuePair) new BasicNameValuePair("templateId", applicationMonitorId)); return new HttpHelper(slaUrl).getRequest(GET_AGREEMENT_OP, paremeters); } AgreementGenerator(String slaUrl); }
AgreementGenerator { public String getAgreement(String applicationMonitorId) { List<NameValuePair> paremeters = MutableList.of((NameValuePair) new BasicNameValuePair("templateId", applicationMonitorId)); return new HttpHelper(slaUrl).getRequest(GET_AGREEMENT_OP, paremeters); } AgreementGenerator(String slaUrl); String generateAgreeemntId(String templateDescription, MonitoringInfo monitoringInfo); String getAgreement(String applicationMonitorId); }
AgreementGenerator { public String getAgreement(String applicationMonitorId) { List<NameValuePair> paremeters = MutableList.of((NameValuePair) new BasicNameValuePair("templateId", applicationMonitorId)); return new HttpHelper(slaUrl).getRequest(GET_AGREEMENT_OP, paremeters); } AgreementGenerator(String slaUrl); String generateAgreeemntId(String templateDescription, MonitoringInfo monitoringInfo); String getAgreement(String applicationMonitorId);  }