### Question:
ChargingStationOcpp12SoapClient implements ChargingStationOcpp12Client { @Override public boolean changeConfiguration(ChargingStationId id, ConfigurationItem configurationItem) { checkNotNull(id); checkNotNull(configurationItem); final String key = configurationItem.getKey(); final String value = configurationItem.getValue(); ChargePointService chargePointService = this.createChargingStationService(id); ChangeConfigurationRequest request = new ChangeConfigurationRequest(); request.setKey(key); request.setValue(value); ChangeConfigurationResponse response = chargePointService.changeConfiguration(request, id.getId()); boolean hasConfigurationChanged; switch (response.getStatus()) { case ACCEPTED: LOG.info("Configuration change of {} on {} has been accepted", key, id); hasConfigurationChanged = true; break; case REJECTED: LOG.info("Configuration change of {} on {} was rejected", key, id); hasConfigurationChanged = false; break; case NOT_SUPPORTED: LOG.info("Configuration change of {} on {} was not supported", key, id); hasConfigurationChanged = false; break; default: throw new AssertionError("Configuration change returned unknown response status " + response.getStatus()); } return hasConfigurationChanged; }  @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);  }### Answer:
@Test public void changeConfigurationAcceptedVerifyReturnValue() { when(chargePointService.changeConfiguration(any(ChangeConfigurationRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getChangeConfigurationResponse(ConfigurationStatus.ACCEPTED)); boolean hasConfigurationChanged = client.changeConfiguration(CHARGING_STATION_ID, CONFIGURATION_ITEM); assertTrue(hasConfigurationChanged); }
@Test public void changeConfigurationNotSupportedVerifyReturnValue() { when(chargePointService.changeConfiguration(any(ChangeConfigurationRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getChangeConfigurationResponse(ConfigurationStatus.NOT_SUPPORTED)); boolean hasConfigurationChanged = client.changeConfiguration(CHARGING_STATION_ID, CONFIGURATION_ITEM); assertFalse(hasConfigurationChanged); }
@Test public void changeConfigurationRejectedVerifyReturnValue() { when(chargePointService.changeConfiguration(any(ChangeConfigurationRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getChangeConfigurationResponse(ConfigurationStatus.REJECTED)); boolean hasConfigurationChanged = client.changeConfiguration(CHARGING_STATION_ID, CONFIGURATION_ITEM); assertFalse(hasConfigurationChanged); }
@Test public void changeConfigurationVerifyServiceCall() { when(chargePointService.changeConfiguration(any(ChangeConfigurationRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getChangeConfigurationResponse(ConfigurationStatus.ACCEPTED)); ArgumentCaptor<ChangeConfigurationRequest> changeConfigurationArgument = ArgumentCaptor.forClass(ChangeConfigurationRequest.class); client.changeConfiguration(CHARGING_STATION_ID, CONFIGURATION_ITEM); verify(chargePointService).changeConfiguration(changeConfigurationArgument.capture(), eq(CHARGING_STATION_ID.getId())); assertEquals(CONFIGURATION_ITEM.getKey(), changeConfigurationArgument.getValue().getKey()); assertEquals(CONFIGURATION_ITEM.getValue(), changeConfigurationArgument.getValue().getValue()); }