@Test public void onEventAuthorizationResultEventNoContinuationNoExceptions() { AuthorizationFutureEventCallback callback = new AuthorizationFutureEventCallback(); EventMessage eventMessage = asEventMessage(new AuthorizationResultEvent(CHARGING_STATION_ID, IDENTIFYING_TOKEN_ACCEPTED, AuthorizationResultStatus.ACCEPTED, NULL_USER_IDENTITY_CONTEXT)); callback.onEvent(eventMessage); }
@Override public boolean onEvent(EventMessage<?> event) { AuthorizationResultEvent resultEvent; if (event.getPayload() instanceof AuthorizationResultEvent) { resultEvent = (AuthorizationResultEvent) event.getPayload(); this.setResult(new AuthorizationResult(resultEvent.getIdentifyingToken().getToken(), resultEvent.getAuthenticationStatus())); this.countDownLatch(); if (continuation != null) { continuation.resume(); } return true; } else { return false; } }
AuthorizationFutureEventCallback extends FutureEventCallback<AuthorizationResult> implements ContinuationFutureCallback { @Override public boolean onEvent(EventMessage<?> event) { AuthorizationResultEvent resultEvent; if (event.getPayload() instanceof AuthorizationResultEvent) { resultEvent = (AuthorizationResultEvent) event.getPayload(); this.setResult(new AuthorizationResult(resultEvent.getIdentifyingToken().getToken(), resultEvent.getAuthenticationStatus())); this.countDownLatch(); if (continuation != null) { continuation.resume(); } return true; } else { return false; } } }
AuthorizationFutureEventCallback extends FutureEventCallback<AuthorizationResult> implements ContinuationFutureCallback { @Override public boolean onEvent(EventMessage<?> event) { AuthorizationResultEvent resultEvent; if (event.getPayload() instanceof AuthorizationResultEvent) { resultEvent = (AuthorizationResultEvent) event.getPayload(); this.setResult(new AuthorizationResult(resultEvent.getIdentifyingToken().getToken(), resultEvent.getAuthenticationStatus())); this.countDownLatch(); if (continuation != null) { continuation.resume(); } return true; } else { return false; } }  }
AuthorizationFutureEventCallback extends FutureEventCallback<AuthorizationResult> implements ContinuationFutureCallback { @Override public boolean onEvent(EventMessage<?> event) { AuthorizationResultEvent resultEvent; if (event.getPayload() instanceof AuthorizationResultEvent) { resultEvent = (AuthorizationResultEvent) event.getPayload(); this.setResult(new AuthorizationResult(resultEvent.getIdentifyingToken().getToken(), resultEvent.getAuthenticationStatus())); this.countDownLatch(); if (continuation != null) { continuation.resume(); } return true; } else { return false; } }  @Override boolean onEvent(EventMessage<?> event); @Override void setContinuation(Continuation continuation); }
AuthorizationFutureEventCallback extends FutureEventCallback<AuthorizationResult> implements ContinuationFutureCallback { @Override public boolean onEvent(EventMessage<?> event) { AuthorizationResultEvent resultEvent; if (event.getPayload() instanceof AuthorizationResultEvent) { resultEvent = (AuthorizationResultEvent) event.getPayload(); this.setResult(new AuthorizationResult(resultEvent.getIdentifyingToken().getToken(), resultEvent.getAuthenticationStatus())); this.countDownLatch(); if (continuation != null) { continuation.resume(); } return true; } else { return false; } }  @Override boolean onEvent(EventMessage<?> event); @Override void setContinuation(Continuation continuation);  }