@Test
  public void testDataTransmittedBetweenSenderAndReceiverIfMembershipCheckPassed()
      throws Exception {
    final Connection reader = createConnectionsAndWriteMessage(true, false, false);

    await().untilAsserted(() -> verify(reader, times(1)).readMessage(any(), any()));
    assertThat(reader.isClosing()).isFalse();
    verify(reader).readHandshakeForReceiver(any());
    verify(reader).readMessage(any(), any());
    verify(reader, times(0)).requestClose(any());
  }
Create a sender connection and a receiver connection and pass data from
one to the other.

This test uses a real socket, but mocks all other collaborators
of connection, such as the InternalDistributedSystem.
geode-core/src/test/java/org/apache/geode/internal/tcp/ConnectionTransmissionTest.java