@Test
public void shouldCloseClosableSilently() throws IOException {

    Closeable closeable = mock(Closeable.class);
    doThrow(new IOException("This should never happen")).when(closeable).close();
    try {
        closeable.close();
        fail("IOException should be thrown.");
    } catch (Exception e) {
    }
    IOUtilities.closeSilently(closeable);
}