public static void validateJarOnMember(SubmitJobParameters parameterObject) {
        if (!parameterObject.isJarOnMember()) {
            throw new JetException("SubmitJobParameters is configured for jar on client");
        }

        Path jarPath = parameterObject.getJarPath();
        validateJarPathNotNull(jarPath);
        validateFileExtension(jarPath);
        validateJobParameters(parameterObject.getJobParameters());
    }
@Test
    public void failJarOnClientConfiguration() {
        SubmitJobParameters parameterObject = SubmitJobParameters.withJarOnClient();
        assertThatThrownBy(() -> SubmitJobParametersValidator.validateJarOnMember(parameterObject))
                .isInstanceOf(JetException.class)
                .hasMessageContaining("SubmitJobParameters is configured for jar on client");
    }