@Test public void getDiagnosticsVerifyServiceCall() { when(chargePointService.getDiagnostics(any(GetDiagnosticsRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getGetDiagnosticsResponse(DIAGNOSTICS_FILENAME)); ArgumentCaptor<GetDiagnosticsRequest> getDiagnosticsArgument = ArgumentCaptor.forClass(GetDiagnosticsRequest.class); client.getDiagnostics(CHARGING_STATION_ID, new DiagnosticsUploadSettings(UPLOAD_LOCATION, NUMBER_OF_RETRIES, RETRY_INTERVAL, PERIOD_START_TIME, PERIOD_STOP_TIME)); verify(chargePointService).getDiagnostics(getDiagnosticsArgument.capture(), eq(CHARGING_STATION_ID.getId())); assertEquals(UPLOAD_LOCATION, getDiagnosticsArgument.getValue().getLocation()); assertEquals(NUMBER_OF_RETRIES, getDiagnosticsArgument.getValue().getRetries()); assertEquals(RETRY_INTERVAL, getDiagnosticsArgument.getValue().getRetryInterval()); assertEquals(PERIOD_START_TIME, getDiagnosticsArgument.getValue().getStartTime()); assertEquals(PERIOD_STOP_TIME, getDiagnosticsArgument.getValue().getStopTime()); }
@Override public String getDiagnostics(ChargingStationId id, DiagnosticsUploadSettings diagnosticsUploadSettings) { ChargePointService chargePointService = this.createChargingStationService(id); GetDiagnosticsRequest request = new GetDiagnosticsRequest(); request.setLocation(diagnosticsUploadSettings.getUploadLocation()); request.setRetries(diagnosticsUploadSettings.getNumRetries()); request.setRetryInterval(diagnosticsUploadSettings.getRetryInterval()); request.setStartTime(diagnosticsUploadSettings.getPeriodStartTime()); request.setStopTime(diagnosticsUploadSettings.getPeriodStopTime()); GetDiagnosticsResponse response = chargePointService.getDiagnostics(request, id.getId()); return response.getFileName(); }
ChargingStationOcpp12SoapClient implements ChargingStationOcpp12Client { @Override public String getDiagnostics(ChargingStationId id, DiagnosticsUploadSettings diagnosticsUploadSettings) { ChargePointService chargePointService = this.createChargingStationService(id); GetDiagnosticsRequest request = new GetDiagnosticsRequest(); request.setLocation(diagnosticsUploadSettings.getUploadLocation()); request.setRetries(diagnosticsUploadSettings.getNumRetries()); request.setRetryInterval(diagnosticsUploadSettings.getRetryInterval()); request.setStartTime(diagnosticsUploadSettings.getPeriodStartTime()); request.setStopTime(diagnosticsUploadSettings.getPeriodStopTime()); GetDiagnosticsResponse response = chargePointService.getDiagnostics(request, id.getId()); return response.getFileName(); } }
ChargingStationOcpp12SoapClient implements ChargingStationOcpp12Client { @Override public String getDiagnostics(ChargingStationId id, DiagnosticsUploadSettings diagnosticsUploadSettings) { ChargePointService chargePointService = this.createChargingStationService(id); GetDiagnosticsRequest request = new GetDiagnosticsRequest(); request.setLocation(diagnosticsUploadSettings.getUploadLocation()); request.setRetries(diagnosticsUploadSettings.getNumRetries()); request.setRetryInterval(diagnosticsUploadSettings.getRetryInterval()); request.setStartTime(diagnosticsUploadSettings.getPeriodStartTime()); request.setStopTime(diagnosticsUploadSettings.getPeriodStopTime()); GetDiagnosticsResponse response = chargePointService.getDiagnostics(request, id.getId()); return response.getFileName(); }  }
ChargingStationOcpp12SoapClient implements ChargingStationOcpp12Client { @Override public String getDiagnostics(ChargingStationId id, DiagnosticsUploadSettings diagnosticsUploadSettings) { ChargePointService chargePointService = this.createChargingStationService(id); GetDiagnosticsRequest request = new GetDiagnosticsRequest(); request.setLocation(diagnosticsUploadSettings.getUploadLocation()); request.setRetries(diagnosticsUploadSettings.getNumRetries()); request.setRetryInterval(diagnosticsUploadSettings.getRetryInterval()); request.setStartTime(diagnosticsUploadSettings.getPeriodStartTime()); request.setStopTime(diagnosticsUploadSettings.getPeriodStopTime()); GetDiagnosticsResponse response = chargePointService.getDiagnostics(request, id.getId()); return response.getFileName(); }  @Override boolean startTransaction(ChargingStationId id, IdentifyingToken identifyingToken, EvseId evseId); @Override boolean stopTransaction(ChargingStationId id, int transactionId); @Override boolean softReset(ChargingStationId id); @Override boolean hardReset(ChargingStationId id); @Override RequestResult unlockConnector(ChargingStationId id, EvseId evseId); @Override RequestResult changeAvailabilityToInoperative(ChargingStationId id, EvseId evseId); @Override RequestResult changeAvailabilityToOperative(ChargingStationId id, EvseId evseId); @Override boolean changeConfiguration(ChargingStationId id, ConfigurationItem configurationItem); @Override String getDiagnostics(ChargingStationId id, DiagnosticsUploadSettings diagnosticsUploadSettings); @Override boolean clearCache(ChargingStationId id); @Override void updateFirmware(ChargingStationId id, String downloadLocation, Date retrieveDate, Integer numRetries, Integer retryInterval); void setDomainService(DomainService domainService); void setChargingStationProxyFactory(ChargingStationProxyFactory chargingStationProxyFactory); }
ChargingStationOcpp12SoapClient implements ChargingStationOcpp12Client { @Override public String getDiagnostics(ChargingStationId id, DiagnosticsUploadSettings diagnosticsUploadSettings) { ChargePointService chargePointService = this.createChargingStationService(id); GetDiagnosticsRequest request = new GetDiagnosticsRequest(); request.setLocation(diagnosticsUploadSettings.getUploadLocation()); request.setRetries(diagnosticsUploadSettings.getNumRetries()); request.setRetryInterval(diagnosticsUploadSettings.getRetryInterval()); request.setStartTime(diagnosticsUploadSettings.getPeriodStartTime()); request.setStopTime(diagnosticsUploadSettings.getPeriodStopTime()); GetDiagnosticsResponse response = chargePointService.getDiagnostics(request, id.getId()); return response.getFileName(); }  @Override boolean startTransaction(ChargingStationId id, IdentifyingToken identifyingToken, EvseId evseId); @Override boolean stopTransaction(ChargingStationId id, int transactionId); @Override boolean softReset(ChargingStationId id); @Override boolean hardReset(ChargingStationId id); @Override RequestResult unlockConnector(ChargingStationId id, EvseId evseId); @Override RequestResult changeAvailabilityToInoperative(ChargingStationId id, EvseId evseId); @Override RequestResult changeAvailabilityToOperative(ChargingStationId id, EvseId evseId); @Override boolean changeConfiguration(ChargingStationId id, ConfigurationItem configurationItem); @Override String getDiagnostics(ChargingStationId id, DiagnosticsUploadSettings diagnosticsUploadSettings); @Override boolean clearCache(ChargingStationId id); @Override void updateFirmware(ChargingStationId id, String downloadLocation, Date retrieveDate, Integer numRetries, Integer retryInterval); void setDomainService(DomainService domainService); void setChargingStationProxyFactory(ChargingStationProxyFactory chargingStationProxyFactory);  }