Exemplo n.º 1
0
  @Test
  public void testClosed() throws Exception {
    IoUtil.close(null);

    IOException e = new IOException();
    Closeable c = mock(Closeable.class);
    doThrow(e).when(c).close();
    assertSame(e, IoUtil.close(c));
  }