@Test public void onCloseCallback_ShouldUnsubscribeAndCloseSession() { final String sessionId = wsContext.getSessionId(); remoteValidatorApi.unsubscribeValidator(wsContext); verify(wsSession).close(); verify(subscriptionManager).unsubscribe(eq(sessionId)); }
@VisibleForTesting void unsubscribeValidator(final WsContext handler) { handler.session.close(); subscriptionManager.unsubscribe(handler.getSessionId()); }
RemoteValidatorApi { @VisibleForTesting void unsubscribeValidator(final WsContext handler) { handler.session.close(); subscriptionManager.unsubscribe(handler.getSessionId()); } }
RemoteValidatorApi { @VisibleForTesting void unsubscribeValidator(final WsContext handler) { handler.session.close(); subscriptionManager.unsubscribe(handler.getSessionId()); } RemoteValidatorApi(
      final GlobalConfiguration configuration,
      final RemoteValidatorSubscriptions subscriptionManager); }
RemoteValidatorApi { @VisibleForTesting void unsubscribeValidator(final WsContext handler) { handler.session.close(); subscriptionManager.unsubscribe(handler.getSessionId()); } RemoteValidatorApi(
      final GlobalConfiguration configuration,
      final RemoteValidatorSubscriptions subscriptionManager);  }
RemoteValidatorApi { @VisibleForTesting void unsubscribeValidator(final WsContext handler) { handler.session.close(); subscriptionManager.unsubscribe(handler.getSessionId()); } RemoteValidatorApi(
      final GlobalConfiguration configuration,
      final RemoteValidatorSubscriptions subscriptionManager);   }