@Test
public void testImmediateFlushOutsideOfReadLoop() {

    final AtomicInteger flushCount = new AtomicInteger();
    EmbeddedChannel channel = newChannel(flushCount, false);
    channel.flush();
    assertEquals(1, flushCount.get());
    assertFalse(channel.finish());
}