### Question:
AdapterService { public String calculIndicators(JasmineEventEB[] events) { if (events == null) return ""; Hashtable<String, BusinessServiceLevel> serviceLevels = new Hashtable<String, BusinessServiceLevel>(); for (JasmineEventEB ev : events) { String probe = ev.getProbe(); String[] evProp = probe.split("\\."); String provider = evProp[1] + "." + evProp[2]; String service = evProp[3]; String identifier = service + "@" + provider; String dataType = evProp[4]; if (dataType.equals("ResponseTime")) { Iterator<BusinessSLA> it = businessSLA.iterator(); BusinessSLA sla = null; int k = 0; while (it.hasNext() && (!(sla = it.next()).getProvider().equals(provider) || !sla .getService().equals(service))) { k++; } if (k < businessSLA.size()) { BusinessServiceLevel level = sla.computeServiceLevel( Long.parseLong((String) ev.getValue()), ev.getTimestamp()); BusinessServiceLevel oldLevel = serviceLevels .get(identifier); if (oldLevel == null || level.isWorse(oldLevel)) { serviceLevels.put(identifier, level); } } } } StringBuffer res = new StringBuffer(); Enumeration<String> serviceIdentifiers = serviceLevels.keys(); while (serviceIdentifiers.hasMoreElements()) { String serviceIdentifier = serviceIdentifiers.nextElement(); BusinessServiceLevel level = serviceLevels.get(serviceIdentifier); res.append(serviceIdentifier + " is " + level + " level"); res.append("\n"); } return res.toString(); } AdapterService();  AdapterService(List<BusinessSLA> businessSLA); @Validate void start(); void exportData(Date date1, Date date2); void calculTodayIndicators(); void calculIndicatorsFromTo(Date from, Date to); void calculAndExportIndicatorsFromTo(); String calculIndicators(JasmineEventEB[] events); List<ServiceBizSLAResult> calculIndicatorsService(JasmineEventEB[] events); @Invalidate void stop();  }### Answer:
@Test public void calculIndicatorsTest() throws ParseException{ List<BusinessSLA>businessSLA = new ArrayList<BusinessSLA>(); BusinessSLA temp = new BusinessSLA(70, 70, 70, new HoursPeriod(0, 1440), new HoursPeriod(420, 1320), new HoursPeriod(600, 1080), "smarttravel.com", "booktrip", "slaName"); businessSLA.add(temp); AdapterService adapt= new AdapterService(businessSLA); SimpleDateFormat formate = new SimpleDateFormat("yyyy-MM-dd_HH:mm"); Date date=formate.parse("2012-07-01_12:00"); JasmineEventEB e=new JasmineEventEB("qos-event", "", "", "misc:type=unknown:qosevent.smarttravel.com.booktrip.ResponseTime", "43",date, ""); JasmineEventEB[] events=new JasmineEventEB[1]; events[0]=e; String res=adapt.calculIndicators(events); assertEquals(res,"booktrip@smarttravel.com is GOLD level\n"); }