AmazonDataConverter { public List<VMInformation> processStateChange(List<InstanceStateChange> changes) { List<VMInformation> output = new ArrayList<VMInformation>(); try { for (InstanceStateChange instance : changes) { VMInformation info = new VMInformation(); info.setInstanceId(instance.getInstanceId()); info.setState(instance.getCurrentState().getName()); output.add(info); } return output; } catch (Exception ex) { LOG.error(ex.getMessage(), ex); if (ex instanceof RuntimeException) { throw (RuntimeException) ex; } throw new RuntimeException(ex); } }  List<VMInformation> processStateChange(List<InstanceStateChange> changes); VMInformation instanceToVmInformation(Reservation data, Instance instance, VMRegion region); List<VMInformation> processReservation(Reservation reservation, VMRegion region);  }
@Test public void testProcessStateChange_1() throws Exception { AmazonDataConverter fixture = new AmazonDataConverter(); List<InstanceStateChange> changes = new LinkedList(); List<VMInformation> result = fixture.processStateChange(changes); assertNotNull(result); assertEquals(0, result.size()); }
@Test public void testProcessStateChange_2() throws Exception { AmazonDataConverter fixture = new AmazonDataConverter(); List<InstanceStateChange> changes = new LinkedList(); List<VMInformation> result = fixture.processStateChange(changes); assertNotNull(result); assertEquals(0, result.size()); }