@Override
    public void run() {
        // top-level command, do nothing
    }
@Test
    public void test_submit_job_with_hazelcast_classes() throws IOException {
        Logger logger = (Logger) LogManager.getLogger(MainClassNameFinder.class);
        Appender appender = mock(Appender.class);
        when(appender.getName()).thenReturn("Mock Appender");
        when(appender.isStarted()).thenReturn(true);
        logger.addAppender(appender);

        PrintStream oldErr = System.err;
        PrintStream oldOut = System.out;
        System.setErr(new PrintStream(err));
        System.setOut(new PrintStream(out));
        Path testJarFile = Files.createTempFile("testjob-with-hazelcast-codebase-", ".jar");
        try (InputStream inputStream = HazelcastCommandLineTest.class.getResourceAsStream("testjob-with-hazelcast-codebase.jar")) {
            assert inputStream != null;
            Files.copy(inputStream, testJarFile, StandardCopyOption.REPLACE_EXISTING);
        }
        try {
            run("submit", testJarFile.toString());

            ArgumentCaptor<LogEvent> logEventCaptor = ArgumentCaptor.forClass(LogEvent.class);
            verify(appender).append(logEventCaptor.capture());
            LogEvent logEvent = logEventCaptor.getValue();

            String actual = logEvent.getMessage().toString();
            String pathToClass = Paths.get("com", "hazelcast", "jet", "testjob", "HazelcastBootstrap.class").toString();
            assertThat(actual).contains("WARNING: Hazelcast code detected in the jar: " + pathToClass + ". Hazelcast dependency should be set with the 'provided' scope or equivalent.");
        } finally {
            System.setErr(oldErr);
            System.setOut(oldOut);
            IOUtil.deleteQuietly(testJarFile.toFile());
        }
    }