@Test
    public void testOffsetFileNotExists() {
        assertThrows(IOException.class, () -> DeleteRecordsCommand.execute(new String[]{
            "--bootstrap-server", "localhost:9092",
            "--offset-json-file", "/not/existing/file"
        }, System.out));
        assertEquals(1, DeleteRecordsCommand.mainNoExit(
            "--bootstrap-server", "localhost:9092",
            "--offset-json-file", "/not/existing/file"));
    }
Unit test of {@link DeleteRecordsCommand} tool.
tools/src/test/java/org/apache/kafka/tools/DeleteRecordsCommandTest.java