public void testConnection() throws NetworkIOException {
        ApnsConnectionImpl testConnection = null;
        try {
            testConnection =
                    new ApnsConnectionImpl(factory, host, port, proxy, proxyUsername, proxyPassword, reconnectPolicy.copy(), delegate);
            final ApnsNotification notification = new EnhancedApnsNotification(0, 0, new byte[]{0}, new byte[]{0});
            testConnection.sendMessage(notification);
        } finally {
            if (testConnection != null) {
                testConnection.close();
            }
        }
    }
Read a packet like in.readFully(bytes) does - but do not throw an exception and return false if nothing
could be read at all.
@param in the input stream
@param bytes the array to be filled with data
@return true if a packet as been read, false if the stream was at EOF right at the beginning.
@throws IOException When a problem occurs, especially EOFException when there's an EOF in the middle of the packet.
src/main/java/com/notnoop/apns/internal/ApnsConnectionImpl.java