code: private ChargingStation checkChargingStationExistsAndIsRegisteredAndConfigured(ChargingStationId chargingStationId) {
          ChargingStation chargingStation = chargingStationRepository.findOne(chargingStationId.getId());
  
          if (chargingStation == null) {
              throw new IllegalStateException("Unknown charging station.");
          }
  
          if (!chargingStation.isRegisteredAndConfigured()) {
              throw new IllegalStateException("Charging station has not been registered/configured.");
          }
  
          return chargingStation;
      }
docs: Checks if the charging station exists in the repository and if it has been registered and configured. If not a
  IllegalStateException will be thrown.
  
  @param chargingStationId      charging station identifier.
  @return ChargingStation       if the charging station exists and is registered and configured.
  @throws IllegalStateException if the charging station does not exist in the repository, or it has not been
  registered and configured.