@Test
    public void testCreatedClosed() {
        IdempotentCloser ic = new IdempotentCloser(true);
        assertTrue(ic.isClosed());
        assertThrows(IllegalStateException.class, () -> ic.assertOpen(() -> "test"));
        assertDoesNotThrow(() -> ic.close(CALLBACK_WITH_RUNTIME_EXCEPTION));
    }
Tests that if the {@link IdempotentCloser} is created with its initial state as closed, the various APIs
will behave as expected.
clients/src/test/java/org/apache/kafka/common/internals/IdempotentCloserTest.java