### Question:
EnergyModellerConverter { public static List<eu.ascetic.paas.applicationmanager.model.ApplicationSample> convertSampleList(List<ApplicationSample> applicationSamples) { if(applicationSamples == null) { return null; } List<eu.ascetic.paas.applicationmanager.model.ApplicationSample> newApplicationSamples = new ArrayList<eu.ascetic.paas.applicationmanager.model.ApplicationSample>(); for(ApplicationSample applicationSample : applicationSamples) { eu.ascetic.paas.applicationmanager.model.ApplicationSample newApplicationSample = convert(applicationSample); newApplicationSamples.add(newApplicationSample); } return newApplicationSamples; }  static eu.ascetic.paas.applicationmanager.model.EventSample convert(EventSample eventSample); static eu.ascetic.paas.applicationmanager.model.ApplicationSample convert(ApplicationSample applicationSample); static List<eu.ascetic.paas.applicationmanager.model.EventSample> convertList(List<EventSample> eventSamples); static List<eu.ascetic.paas.applicationmanager.model.ApplicationSample> convertSampleList(List<ApplicationSample> applicationSamples);  }### Answer:
@Test public void convertSampleListTest() { List<eu.ascetic.paas.applicationmanager.model.ApplicationSample> newApplicationSamples = EnergyModellerConverter.convertSampleList(null); assertEquals(null, newApplicationSamples); ApplicationSample applicationSample1 = new ApplicationSample(); applicationSample1.setAppid("appid"); applicationSample1.setC_value(1.0); applicationSample1.setE_value(2.0); applicationSample1.setOrderID(5); applicationSample1.setP_value(3.0); applicationSample1.setTime(2l); applicationSample1.setVmid("vmid"); ApplicationSample applicationSample2 = new ApplicationSample(); applicationSample2.setAppid("appid2"); applicationSample2.setC_value(4.0); applicationSample2.setE_value(5.0); applicationSample2.setOrderID(7); applicationSample2.setP_value(6.0); applicationSample2.setTime(3l); applicationSample2.setVmid("vmid2"); List<ApplicationSample> applicationSamples = new ArrayList<ApplicationSample>(); applicationSamples.add(applicationSample1); applicationSamples.add(applicationSample2); newApplicationSamples = EnergyModellerConverter.convertSampleList(applicationSamples); assertEquals(2, newApplicationSamples.size()); assertEquals(1.0, newApplicationSamples.get(0).getcValue(), 0.00001); assertEquals(2.0, newApplicationSamples.get(0).geteValue(), 0.00001); assertEquals(3.0, newApplicationSamples.get(0).getpValue(), 0.00001); assertEquals(2l, newApplicationSamples.get(0).getTime()); assertEquals("appid", newApplicationSamples.get(0).getAppid()); assertEquals("vmid", newApplicationSamples.get(0).getVmid()); assertEquals(5, newApplicationSamples.get(0).getOrderID()); assertEquals(4.0, newApplicationSamples.get(1).getcValue(), 0.00001); assertEquals(5.0, newApplicationSamples.get(1).geteValue(), 0.00001); assertEquals(6.0, newApplicationSamples.get(1).getpValue(), 0.00001); assertEquals(3l, newApplicationSamples.get(1).getTime()); assertEquals("appid2", newApplicationSamples.get(1).getAppid()); assertEquals("vmid2", newApplicationSamples.get(1).getVmid()); assertEquals(7, newApplicationSamples.get(1).getOrderID()); }