Code example for Manifest

Methods: getEntriesgetMainAttributes

public class OldManifestTest extends TestCase {
    public void test_ConstructorLjava_util_jar_Manifest() { 
        // Test for method java.util.jar.Manifest() 
        Manifest emptyManifest = new Manifest();
        Manifest emptyClone = new Manifest(emptyManifest);
        assertTrue("Should have no entries", emptyClone.getEntries().isEmpty());
        assertTrue("Should have no main attributes", emptyClone
        assertEquals(emptyClone, emptyManifest);
        assertEquals(emptyClone, emptyManifest.clone());
    private void assertAttribute(Attributes attr, String name, String value) {
        assertEquals("Incorrect " + name, value, attr.getValue(name));
    private void checkManifest(Manifest manifest) {
        Attributes main = manifest.getMainAttributes();
        assertAttribute(main, "Bundle-Name", "ClientSupport");
Contextual code suggestions in your IDE  Get Codota for Java