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);  }
@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); }