### Question:
MotownCentralSystemService implements io.motown.ocpp.v15.soap.centralsystem.schema.CentralSystemService { @Override public AuthorizeResponse authorize(final AuthorizeRequest request, final String chargeBoxIdentity) { final AuthorizationFutureEventCallback future = new AuthorizationFutureEventCallback(); final ChargingStationId chargingStationId = new ChargingStationId(chargeBoxIdentity); FutureRequestHandler<AuthorizeResponse, AuthorizationResult> handler = new FutureRequestHandler<>(context.getMessageContext(), continuationTimeout); return handler.handle(future, new CallInitiator() { @Override public void initiateCall() { domainService.authorize(chargingStationId, request.getIdTag(), future, addOnIdentity); } }, new AuthorizeResponseFactory(), new ResponseFactory<AuthorizeResponse>() { @Override public AuthorizeResponse createResponse() { LOG.error("Error while handling 'authorize' request, returning invalid for idTag: {}", request.getIdTag()); AuthorizeResponse response = new AuthorizeResponse(); IdTagInfo tagInfo = new IdTagInfo(); tagInfo.setStatus(AuthorizationStatus.INVALID); response.setIdTagInfo(tagInfo); return response; } }); }  @Override DataTransferResponse dataTransfer(final DataTransferRequest request, final String chargeBoxIdentity); @Override StatusNotificationResponse statusNotification(StatusNotificationRequest request, String chargeBoxIdentity); @Override StopTransactionResponse stopTransaction(StopTransactionRequest request, String chargeBoxIdentity); @Override BootNotificationResponse bootNotification(BootNotificationRequest request, String chargeBoxIdentity); @Override HeartbeatResponse heartbeat(HeartbeatRequest parameters, String chargeBoxIdentity); @Override MeterValuesResponse meterValues(MeterValuesRequest request, String chargeBoxIdentity); @Override DiagnosticsStatusNotificationResponse diagnosticsStatusNotification(DiagnosticsStatusNotificationRequest request, String chargeBoxIdentity); @Override AuthorizeResponse authorize(final AuthorizeRequest request, final String chargeBoxIdentity); @Override FirmwareStatusNotificationResponse firmwareStatusNotification(FirmwareStatusNotificationRequest request, String chargeBoxIdentity); @Override StartTransactionResponse startTransaction(final StartTransactionRequest parameters, final String chargeBoxIdentity); void setDomainService(DomainService domainService); void setContext(WebServiceContext context); void setContinuationTimeout(int continuationTimeout); void setHeartbeatIntervalFallback(int heartbeatIntervalFallback); void setSoapHeaderReader(SoapHeaderReader soapHeaderReader); void setAddOnId(String id); static final String ADD_ON_TYPE; }### Answer:
@Test public void authorizeAcceptedVerifyResponse() throws InterruptedException, ExecutionException { prepareAuthorization(AuthorizationResultStatus.ACCEPTED); AuthorizeRequest request = new AuthorizeRequest(); request.setIdTag(IDENTIFYING_TOKEN.getToken()); AuthorizeResponse response = motownCentralSystemService.authorize(request, CHARGING_STATION_ID.getId()); assertEquals(AuthorizationStatus.ACCEPTED, response.getIdTagInfo().getStatus()); }
@Test public void authorizeInvalidVerifyResponse() throws InterruptedException, ExecutionException { prepareAuthorization(AuthorizationResultStatus.INVALID); AuthorizeRequest request = new AuthorizeRequest(); request.setIdTag(IDENTIFYING_TOKEN.getToken()); AuthorizeResponse response = motownCentralSystemService.authorize(request, CHARGING_STATION_ID.getId()); assertEquals(AuthorizationStatus.INVALID, response.getIdTagInfo().getStatus()); }
@Test public void authorizeBlockedVerifyResponse() throws InterruptedException, ExecutionException { prepareAuthorization(AuthorizationResultStatus.BLOCKED); AuthorizeRequest request = new AuthorizeRequest(); request.setIdTag(IDENTIFYING_TOKEN.getToken()); AuthorizeResponse response = motownCentralSystemService.authorize(request, CHARGING_STATION_ID.getId()); assertEquals(AuthorizationStatus.BLOCKED, response.getIdTagInfo().getStatus()); }
@Test public void authorizeExpiredVerifyResponse() throws InterruptedException, ExecutionException { prepareAuthorization(AuthorizationResultStatus.EXPIRED); AuthorizeRequest request = new AuthorizeRequest(); request.setIdTag(IDENTIFYING_TOKEN.getToken()); AuthorizeResponse response = motownCentralSystemService.authorize(request, CHARGING_STATION_ID.getId()); assertEquals(AuthorizationStatus.EXPIRED, response.getIdTagInfo().getStatus()); }