@Test
void shouldReturnSameCompletionStageFromRelease()
{

    EmbeddedChannel channel = newChannel();
    NetworkConnection connection = newConnection( channel );
    CompletionStage<Void> releaseStage1 = connection.release();
    CompletionStage<Void> releaseStage2 = connection.release();
    CompletionStage<Void> releaseStage3 = connection.release();
    channel.runPendingTasks();
    // RESET should be send only once
    assertEquals( 1, channel.outboundMessages().size() );
    assertEquals( RESET, channel.outboundMessages().poll() );
    // all returned stages should be the same
    assertEquals( releaseStage1, releaseStage2 );
    assertEquals( releaseStage2, releaseStage3 );
}