void wrapAndUnwrap() throws SSLException {
        // Reset the buffers.
        messageBuffer.position(0);
        clientPacketBuffer.clear();
        serverApplicationBuffer.clear();

        // Wrap the original message and create the encrypted data.
        doWrap(messageBuffer, clientPacketBuffer);

        // Unwrap the encrypted data and get back the original result.
        doUnwrap(clientPacketBuffer, serverApplicationBuffer);

        // Lightweight comparison - just make sure the unencrypted data length is correct.
        assertEquals(messageBuffer.limit(), serverApplicationBuffer.limit());
    }
Simple benchmark that sends a single message from client to server.
benchmark-base/src/main/java/org/conscrypt/EngineWrapBenchmark.java