static void validateFileExtension(Path jarPath) {
        String fileName = jarPath.getFileName().toString();
        if (!fileName.endsWith(".jar")) {
            throw new JetException("File name extension should be .jar");
        }
    }
@Test
    public void testValidateFileExtension() {
        Path jarPath = Paths.get("foo");
        assertThatThrownBy(() -> JarOnMemberValidator.validateFileExtension(jarPath))
                .isInstanceOf(JetException.class)
                .hasMessageContaining("File name extension should be .jar");
    }