@Override
  public void close() throws IOException {
    try (AutoCloseable c1 = backlogReader;
        AutoCloseable c3 = asCloseable(subscriber)) {
    } catch (Exception e) {
      throw new IOException("Failed when closing reader.", e);
    }
  }
@Test
  public void closeClosesAll() throws Exception {
    startSubscriber();
    doThrow(new IllegalStateException("abc")).when(subscriber).awaitTerminated(1, TimeUnit.MINUTES);
    doThrow(new IllegalStateException("def")).when(backlogReader).close();
    assertThrows(IOException.class, reader::close);
    verify(subscriber).stopAsync();
    verify(subscriber).awaitTerminated(1, TimeUnit.MINUTES);
    verify(backlogReader).close();
  }