### Question:
ChargingStationOcpp15SoapClient implements ChargingStationOcpp15Client { @Override public boolean clearCache(ChargingStationId id) { ChargePointService chargePointService = this.createChargingStationService(id); ClearCacheRequest request = new ClearCacheRequest(); boolean requestResult; ClearCacheResponse response = chargePointService.clearCache(request, id.getId()); if (ClearCacheStatus.ACCEPTED.equals(response.getStatus())) { LOG.info("Clear cache on {} has been accepted", id.getId()); requestResult = true; } else { LOG.warn("Clear cache on {} has been rejected", id.getId()); requestResult = false; } return requestResult; }  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 clearCacheAcceptedVerifyReturnValue() { when(chargePointService.clearCache(any(ClearCacheRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getClearCacheResponse(ClearCacheStatus.ACCEPTED)); boolean requestResult = client.clearCache(CHARGING_STATION_ID); assertTrue(requestResult); }
@Test public void clearCacheRejectedVerifyReturnValue() { when(chargePointService.clearCache(any(ClearCacheRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getClearCacheResponse(ClearCacheStatus.REJECTED)); boolean requestResult = client.clearCache(CHARGING_STATION_ID); assertFalse(requestResult); }
@Test public void clearCacheVerifyServiceCall() { when(chargePointService.clearCache(any(ClearCacheRequest.class), eq(CHARGING_STATION_ID.getId()))).thenReturn(getClearCacheResponse(ClearCacheStatus.ACCEPTED)); client.clearCache(CHARGING_STATION_ID); verify(chargePointService).clearCache(any(ClearCacheRequest.class), eq(CHARGING_STATION_ID.getId())); }