AmazonDataConverter { public List<VMInformation> processReservation(Reservation reservation, VMRegion region) { try { return reservation.getInstances().stream().map(instance -> instanceToVmInformation(reservation, instance, region)).collect(Collectors.toList()); } catch (Exception ex) { LOG.error(ex.getMessage()); 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 testProcessReservation_1() throws Exception { AmazonDataConverter fixture = new AmazonDataConverter(); Reservation reservation = new Reservation(); VMRegion region = VMRegion.ASIA_1; List<VMInformation> result = fixture.processReservation(reservation, region); assertNotNull(result); assertEquals(0, result.size()); }
@Test public void testProcessReservation_2() throws Exception { AmazonDataConverter fixture = new AmazonDataConverter(); Reservation reservation = new Reservation(); VMRegion region = VMRegion.ASIA_1; List<VMInformation> result = fixture.processReservation(reservation, region); assertNotNull(result); assertEquals(0, result.size()); }