@Test public void chargingStationLocationImprovedEventAddressEmptyCoordinates() { chargingStationRepository.createOrUpdate(getRegisteredAndConfiguredChargingStation()); eventHandler.handle(new ChargingStationLocationImprovedEvent(CHARGING_STATION_ID, null, ADDRESS, ACCESSIBILITY, IDENTITY_CONTEXT)); ChargingStation cs = getTestChargingStationFromRepository(); assertEquals(ADDRESS.getAddressLine1(), cs.getAddress()); assertEquals(ADDRESS.getPostalCode(), cs.getPostalCode()); assertEquals(ADDRESS.getRegion(), cs.getRegion()); assertEquals(ADDRESS.getCity(), cs.getCity()); assertEquals(ADDRESS.getCountry(), cs.getCountry()); assertEquals(ACCESSIBILITY.name(), cs.getAccessibility()); }
@EventHandler public void handle(ChargingStationCreatedEvent event) { LOG.info("Handling ChargingStationCreatedEvent"); String chargingStationId = event.getChargingStationId().getId(); ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId); if (chargingStation == null) { chargingStation = new ChargingStation(chargingStationId); } chargingStationRepository.createOrUpdate(chargingStation); }
VasEventHandler { @EventHandler public void handle(ChargingStationCreatedEvent event) { LOG.info("Handling ChargingStationCreatedEvent"); String chargingStationId = event.getChargingStationId().getId(); ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId); if (chargingStation == null) { chargingStation = new ChargingStation(chargingStationId); } chargingStationRepository.createOrUpdate(chargingStation); } }
VasEventHandler { @EventHandler public void handle(ChargingStationCreatedEvent event) { LOG.info("Handling ChargingStationCreatedEvent"); String chargingStationId = event.getChargingStationId().getId(); ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId); if (chargingStation == null) { chargingStation = new ChargingStation(chargingStationId); } chargingStationRepository.createOrUpdate(chargingStation); }  }
VasEventHandler { @EventHandler public void handle(ChargingStationCreatedEvent event) { LOG.info("Handling ChargingStationCreatedEvent"); String chargingStationId = event.getChargingStationId().getId(); ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId); if (chargingStation == null) { chargingStation = new ChargingStation(chargingStationId); } chargingStationRepository.createOrUpdate(chargingStation); }  @EventHandler void handle(ChargingStationCreatedEvent event); @EventHandler void handle(ChargingStationAcceptedEvent event); @EventHandler void handle(ChargingStationConfiguredEvent event); @EventHandler void handle(ChargingStationPlacedEvent event); @EventHandler void handle(ChargingStationLocationImprovedEvent event); @EventHandler void handle(ChargingStationMovedEvent event); @EventHandler void handle(ChargingStationOpeningTimesSetEvent event); @EventHandler void handle(ChargingStationOpeningTimesAddedEvent event); @EventHandler void handle(ChargingStationMadeReservableEvent event); @EventHandler void handle(ChargingStationMadeNotReservableEvent event); @EventHandler void handle(ChargingStationStatusNotificationReceivedEvent event); @EventHandler void handle(ComponentStatusNotificationReceivedEvent event); void setChargingStationRepository(ChargingStationRepository chargingStationRepository); void setConfigurationConversionService(ConfigurationConversionService configurationConversionService); void setSubscriberService(VasSubscriberService subscriberService); }
VasEventHandler { @EventHandler public void handle(ChargingStationCreatedEvent event) { LOG.info("Handling ChargingStationCreatedEvent"); String chargingStationId = event.getChargingStationId().getId(); ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId); if (chargingStation == null) { chargingStation = new ChargingStation(chargingStationId); } chargingStationRepository.createOrUpdate(chargingStation); }  @EventHandler void handle(ChargingStationCreatedEvent event); @EventHandler void handle(ChargingStationAcceptedEvent event); @EventHandler void handle(ChargingStationConfiguredEvent event); @EventHandler void handle(ChargingStationPlacedEvent event); @EventHandler void handle(ChargingStationLocationImprovedEvent event); @EventHandler void handle(ChargingStationMovedEvent event); @EventHandler void handle(ChargingStationOpeningTimesSetEvent event); @EventHandler void handle(ChargingStationOpeningTimesAddedEvent event); @EventHandler void handle(ChargingStationMadeReservableEvent event); @EventHandler void handle(ChargingStationMadeNotReservableEvent event); @EventHandler void handle(ChargingStationStatusNotificationReceivedEvent event); @EventHandler void handle(ComponentStatusNotificationReceivedEvent event); void setChargingStationRepository(ChargingStationRepository chargingStationRepository); void setConfigurationConversionService(ConfigurationConversionService configurationConversionService); void setSubscriberService(VasSubscriberService subscriberService);  }