### Question:
ChargingStationOcpp15SoapClient implements ChargingStationOcpp15Client { @Override public RequestResult unlockConnector(ChargingStationId id, EvseId evseId) { LOG.debug("Unlocking of connector {} on {}", evseId, id); ChargePointService chargePointService = this.createChargingStationService(id); UnlockConnectorRequest request = new UnlockConnectorRequest(); request.setConnectorId(evseId.getNumberedId()); UnlockConnectorResponse response = chargePointService.unlockConnector(request, id.getId()); if (UnlockStatus.ACCEPTED.equals(response.getStatus())) { LOG.info("Unlocking of connector {} on {} has been accepted", evseId, id); return RequestResult.SUCCESS; } else { LOG.warn("Unlocking of connector {} on {} has been rejected", evseId, id); return RequestResult.FAILURE; } }  Map<String, String> getConfiguration(ChargingStationId id, Set<String> keys); @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 DataTransferRequestResult dataTransfer(ChargingStationId id, DataTransferMessage dataTransferMessage); @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); @Override int getAuthorizationListVersion(ChargingStationId id); @Override RequestResult sendAuthorizationList(ChargingStationId id, String hash, int listVersion, Set<IdentifyingToken> identifyingTokens, AuthorizationListUpdateType updateType); @Override io.motown.domain.api.chargingstation.ReservationStatus reserveNow(ChargingStationId id, EvseId evseId, IdentifyingToken identifyingToken, Date expiryDate, IdentifyingToken parentIdentifyingToken, int reservationId); @Override RequestResult cancelReservation(ChargingStationId id, int reservationId); void setDomainService(DomainService domainService); void setChargingStationProxyFactory(ChargingStationProxyFactory chargingStationProxyFactory); void setIdentifyingTokenConverterService(IdentifyingTokenConverterService identifyingTokenConverterService);  }### Answer:
@Test public void unlockConnectorAcceptedVerifyReturnValue() { when(chargePointService.unlockConnector(any(UnlockConnectorRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getUnlockConnectorResponse(UnlockStatus.ACCEPTED)); RequestResult requestResult = client.unlockConnector(CHARGING_STATION_ID, EVSE_ID); assertEquals(RequestResult.SUCCESS, requestResult); }
@Test public void unlockConnectorRejectedVerifyReturnValue() { when(chargePointService.unlockConnector(any(UnlockConnectorRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getUnlockConnectorResponse(UnlockStatus.REJECTED)); RequestResult requestResult = client.unlockConnector(CHARGING_STATION_ID, EVSE_ID); assertEquals(RequestResult.FAILURE, requestResult); }
@Test public void unlockConnectorVerifyServiceCall() { when(chargePointService.unlockConnector(any(UnlockConnectorRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getUnlockConnectorResponse(UnlockStatus.ACCEPTED)); ArgumentCaptor<UnlockConnectorRequest> unlockConnectorArgument = ArgumentCaptor.forClass(UnlockConnectorRequest.class); client.unlockConnector(CHARGING_STATION_ID, EVSE_ID); verify(chargePointService).unlockConnector(unlockConnectorArgument.capture(), eq(CHARGING_STATION_ID.getId())); assertEquals(Integer.parseInt(EVSE_ID.getId()), unlockConnectorArgument.getValue().getConnectorId()); }