public static void validateJarOnClient(SubmitJobParameters parameterObject) throws IOException {
        if (parameterObject.isJarOnMember()) {
            throw new JetException("SubmitJobParameters is configured for jar on member");
        }

        Path jarPath = parameterObject.getJarPath();
        validateJarPathNotNull(jarPath);
        validateFileSizeIsNotZero(jarPath);
        validateFileExtension(jarPath);
        validateJobParameters(parameterObject.getJobParameters());
    }
@Test
    public void noSuchFileException() {
        SubmitJobParameters parameterObject = SubmitJobParameters.withJarOnClient();
        parameterObject.setJarPath(Paths.get("nosuchfile.jar"));
        assertThatThrownBy(() -> SubmitJobParametersValidator.validateJarOnClient(parameterObject))
                .isInstanceOf(NoSuchFileException.class);
    }