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