### Question:
StationMessageSender { public void sendAuthorizeAndSubscribe(String tokenId, List<Integer> evseIds, Subscriber<AuthorizeRequest, AuthorizeResponse> subscriber) { AuthorizeRequest payload = payloadFactory.createAuthorizeRequest(tokenId, evseIds); Call call = createAndRegisterCall(ActionType.AUTHORIZE, payload); callRegistry.addSubscription(call.getMessageId(), payload, subscriber); sendMessage(OcppMessage.builder().data(call.toJson()).build()); } StationMessageSender(SubscriptionRegistry subscriptionRegistry, StationStore stationStore, WebSocketClient webSocketClient); void sendNotifyMonitoringReport(Integer requestId, Map<ComponentVariable, List<SetMonitoringDatum>> monitoringResult); void sendNotifyEvent(List<EventDatum> eventData); void sendTransactionEventStart(Integer evseId, TransactionEventRequest.TriggerReason reason, String tokenId); void sendTransactionEventStart(Integer evseId, Integer connectorId, Integer remoteStartId, TransactionEventRequest.TriggerReason reason); void sendTransactionEventStart(Integer evseId, Integer connectorId, TransactionEventRequest.TriggerReason reason, TransactionData.ChargingState chargingState); void sendTransactionEventUpdate(Integer evseId, Integer connectorId, TransactionEventRequest.TriggerReason reason, TransactionData.ChargingState chargingState); void sendTransactionEventUpdate(Integer evseId, Integer connectorId, TransactionEventRequest.TriggerReason reason, TransactionData.ChargingState chargingState, Long powerConsumed); void sendTransactionEventUpdate(Integer evseId, Integer connectorId, TransactionEventRequest.TriggerReason reason, String tokenId, TransactionData.ChargingState chargingState); void sendTransactionEventUpdate(Integer evseId, Integer connectorId, TransactionEventRequest.TriggerReason reason, String tokenId, TransactionData.ChargingState chargingState, Long powerConsumed); void sendTransactionEventEndedAndSubscribe(Integer evseId, Integer connectorId, TransactionEventRequest.TriggerReason reason, TransactionData.StoppedReason stoppedReason,
                                                      long powerConsumed, Subscriber<TransactionEventRequest, TransactionEventResponse> subscriber); void sendTransactionEventEnded(Integer evseId, Integer connectorId, TransactionEventRequest.TriggerReason triggerReason, TransactionData.StoppedReason stoppedReason, long powerConsumed); void sendAuthorizeAndSubscribe(String tokenId, List<Integer> evseIds, Subscriber<AuthorizeRequest, AuthorizeResponse> subscriber); void sendBootNotificationAndSubscribe(BootNotificationRequest.Reason reason, Subscriber<BootNotificationRequest, BootNotificationResponse> subscriber); void sendBootNotification(BootNotificationRequest.Reason reason); void sendStatusNotificationAndSubscribe(Evse evse, Connector connector, Subscriber<StatusNotificationRequest, StatusNotificationResponse> subscriber); void sendStatusNotification(int evseId, int connectorId); void sendStatusNotification(int evseId, int connectorId, StatusNotificationRequest.ConnectorStatus connectorStatus); void sendDataTransfer(List<Integer> evseIds); void sendStatusNotification(Evse evse, Connector connector); void sendHeartBeatAndSubscribe(HeartbeatRequest heartbeatRequest, Subscriber<HeartbeatRequest, HeartbeatResponse> subscriber); void sendNotifyReport(@Nullable Integer requestId, boolean tbc, int seqNo, ZonedDateTime generatedAt, List<ReportDatum> reportData); void sendSignCertificateRequest(String csr); void sendNotifyCustomerInformationRequest(final NotifyCustomerInformationRequest request); void sendMessage(AbstractWebSocketClientInboxMessage message); void sendCallResult(String callId, Object payload); void sendCallError(String callId, CallError.Code errorCode, Object payload); Map<String, Call> getSentCalls(); LocalDateTime getTimeOfLastMessageSent();  }### Answer:
@Test void verifyAuthorize() throws InterruptedException { stationMessageSender.sendAuthorizeAndSubscribe(DEFAULT_TOKEN_ID, singletonList(DEFAULT_EVSE_ID), DEFAULT_SUBSCRIBER); AbstractWebSocketClientInboxMessage actualMessage = queue.take(); Call actualCall = Call.fromJson(actualMessage.getData().get().toString()); AuthorizeRequest actualPayload = (AuthorizeRequest) actualCall.getPayload(); assertAll( () -> assertThat(actualPayload.getIdToken().getIdToken()).isEqualTo(new CiString.CiString36(DEFAULT_TOKEN_ID)), () -> assertThat(actualPayload.getEvseId()).containsExactly(DEFAULT_EVSE_ID) ); }