@Test
public void testClose() throws IOException {

  EventLogHttpTransferListener listener = new EventLogHttpTransferListener();
  ReadableByteChannel channel = Channels.newChannel(new ByteArrayInputStream(new byte[10]));
  ReadableByteChannel in = new ObservableRedableByteChannel(channel, listener);
  in.close();
  assertFalse(in.isOpen());
  assertEquals(of(Closed.INSTANCE), listener.getEventLog());
}