public static ApnsServerStub prepareAndStartServer() {
        ApnsServerStub server = new ApnsServerStub(FixedCertificates.serverContext().getServerSocketFactory());
        server.start();
        return server;
    }
Create an ApnsServerStub that uses any free port for gateway and feedback.

@return the server stub. Use getEffectiveGatewayPort() and getEffectiveFeedbackPort() to ask for ports.
src/test/java/com/notnoop/apns/utils/ApnsServerStub.java