public static void closeAllQuietly(Collection<? extends AutoCloseable> collection) {
        if (collection == null) {
            return;
        }

        for (AutoCloseable closeable : collection) {
            closeQuietly(closeable);
        }
    }
@Test
    public void test_closeAllQuietly_whenItemNullCollection() throws IOException {
        Closeable closeable1 = mock(Closeable.class);
        Closeable closeable2 = mock(Closeable.class);

        List<Closeable> closeableList = new ArrayList<>();
        closeableList.add(closeable1);
        closeableList.add(null);
        closeableList.add(closeable2);

        closeAllQuietly(closeableList);

        verify(closeable1).close();
        verify(closeable2).close();
    }