public static Optional<String> findFirstManifestAttribute(File jarFile, String... attributes)
            throws IOException {
        if (attributes.length == 0) {
            return Optional.empty();
        }
        try (JarFile f = new JarFile(jarFile)) {
            return findFirstManifestAttribute(f, attributes);
        }
    }
@Test
    void testFindFirstManifestAttributeWithAttributes() throws IOException {
        Optional<String> optionalValue =
                JarManifestParser.findFirstManifestAttribute(
                        TestJob.getTestJobJar(), PackagedProgram.MANIFEST_ATTRIBUTE_MAIN_CLASS);

        assertThat(optionalValue).get().isEqualTo("org.apache.flink.client.testjar.TestJob");
    }