@Deprecated
    public static void setInstance(final XMPPServer instance) {
        XMPPServer.instance = instance;
    }
TODO: (2019-04-24) Remove and replace with <a href="https://github.com/mockito/mockito/issues/1013">Mockito mocking of static methods</a>, when available

@param instance the mock/stub/spy XMPPServer to return when {@link #getInstance()} is called.
@deprecated - for test use only
xmppserver/src/main/java/org/jivesoftware/openfire/XMPPServer.java