@Test
    public void testCloseOnNoAssignment() {
        assertDoesNotThrow(() -> consumerTask.close(), "Close method threw exception");
        assertDoesNotThrow(() -> consumerTask.closeConsumer(), "CloseConsumer method threw exception");
    }
Tests that the consumer task shuts down gracefully when there were no assignments.
storage/src/test/java/org/apache/kafka/server/log/remote/metadata/storage/ConsumerTaskTest.java