private void logSessionStatus() {
        final DomainPair pair = new DomainPair(XMPPServer.getInstance().getServerInfo().getXMPPDomain(), domain.getDomain());
        OutgoingServerSession session = XMPPServer.getInstance().getSessionManager().getOutgoingServerSession(pair);
        if (session != null) {
            Log.info("Session is {}.", session.getStatus());
        } else {
            Log.info("Failed to establish server to server session.");
        }
    }
Logs the status of the session.
xmppserver/src/main/java/org/jivesoftware/util/S2STestService.java