assertEquals(
"The length of the consumed data differs from expected",
0, result.bytesConsumed());
assertTrue(
"The length of the produced data differs from expected",
result.bytesProduced() > 0);
// tune buffer to be read
buffer.flip();
try {
// should rethrow the SSLException "internal error"
print(client.unwrap(buffer, app_data_buffer));