code: @Override
      public void handle(String chargingStationId, JsonObject commandObject, IdentityContext identityContext) throws UserIdentityUnauthorizedException {
          ChargingStationId csId = new ChargingStationId(chargingStationId);
  
          if (!commandAuthorizationService.isAuthorized(csId, identityContext.getUserIdentity(), RequestFirmwareUpdateCommand.class)) {
              throw new UserIdentityUnauthorizedException(chargingStationId, identityContext.getUserIdentity(), RequestFirmwareUpdateCommand.class);
          }
  
          try {
              ChargingStation chargingStation = repository.findOne(chargingStationId);
              if (chargingStation != null && chargingStation.communicationAllowed()) {
                  UpdateFirmwareApiCommand command = gson.fromJson(commandObject, UpdateFirmwareApiCommand.class);
  
                  Map<String, String> optionalAttributes = Maps.newHashMap();
                  if (command.getNumRetries() != null) {
                      optionalAttributes.put(FirmwareUpdateAttributeKey.NUM_RETRIES, command.getNumRetries().toString());
                  }
                  if (command.getRetryInterval() != null) {
                      optionalAttributes.put(FirmwareUpdateAttributeKey.RETRY_INTERVAL, command.getRetryInterval().toString());
                  }
  
                  commandGateway.send(new RequestFirmwareUpdateCommand(csId, command.getLocation(), command.getRetrieveDate(),
                          optionalAttributes, identityContext), new CorrelationToken());
              }
          } catch (JsonSyntaxException ex) {
              throw new IllegalArgumentException("Update firmware command not able to parse the payload, is your json correctly formatted?", ex);
          }
      }
docs: {@inheritDoc}