// Path: org.eclipselabs.plugindependencies.core/src/org/eclipselabs/plugindependencies/core/StringUtil.java
// public static List<String> asList(String ... strings) {
//     return new ArrayList<>(Arrays.asList(strings));
// }
// 
// Path: org.eclipselabs.plugindependencies.core.test/src/org/eclipselabs/plugindependencies/core/fixture/BaseTest.java
// @FixMethodOrder(MethodSorters.NAME_ASCENDING)
// public class BaseTest {
// 
//     @Before
//     public void setup() throws Exception {
//         //
//     }
// 
//     @After
//     public void tearDown() throws Exception {
//         //
//     }
// 
//     protected static String fix(String s){
//         if(s == null){
//             return null;
//         }
//         return s.replace('\\', '/');
//     }
// 
//     @Rule
//     public TestFailReporter failReporter= new TestFailReporter();
// 
//     public class TestFailReporter extends TestWatcher {
// 
//         @Override
//         protected void starting(Description description) {
//             System.out.println("STARTING " + description.toString());
//         }
//         @Override
//         protected void failed(Throwable e, Description description) {
//             System.out.println("FAIL in " + description.toString());
//             e.printStackTrace(System.out);
//         }
// 
//         @Override
//         protected void succeeded(Description description) {
//             System.out.println("PASS in " + description.toString());
//         }
//     }
// }


import static org.eclipselabs.plugindependencies.core.StringUtil.asList;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.jar.Manifest;
import org.eclipselabs.plugindependencies.core.fixture.BaseTest;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
        PlatformState state = new PlatformState();
        Manifest mf = PluginParser.getManifest(plugin6);
        Plugin plugin = PluginParser.parseManifest(mf, state);
        assertEquals("org.company.workcenter", plugin.getName());
        assertEquals("6.3.1", plugin.getVersion());
        Set<Package> exported = new LinkedHashSet<>();
        Package package1 = new Package("com.package.test", "4.11.0");
        Package package2 = new Package("junit.framework", "4.11.0");
        Package package3 = new Package("junit.runner", "4.11.0");
        exported.add(package1);
        exported.add(package2);
        exported.add(package3);
        assertEquals(exported, plugin.getExportedPackages());
    }

    @Test
    public void testNull() throws IOException {
        pluginSet = new LinkedHashSet<>();
        packageSet = new LinkedHashSet<>();

        try {
            PlatformState state = new PlatformState(pluginSet, packageSet, null);
            new PluginParser(state).createPluginsAndAddToSet(null);
            fail();
        } catch (NullPointerException e) {
            // expected
        }
    }

    @Test
// Path: org.eclipselabs.plugindependencies.core/src/org/eclipselabs/plugindependencies/core/StringUtil.java
// public static List<String> asList(String ... strings) {
//     return new ArrayList<>(Arrays.asList(strings));
// }
// 
// Path: org.eclipselabs.plugindependencies.core.test/src/org/eclipselabs/plugindependencies/core/fixture/BaseTest.java
// @FixMethodOrder(MethodSorters.NAME_ASCENDING)
// public class BaseTest {
// 
//     @Before
//     public void setup() throws Exception {
//         //
//     }
// 
//     @After
//     public void tearDown() throws Exception {
//         //
//     }
// 
//     protected static String fix(String s){
//         if(s == null){
//             return null;
//         }
//         return s.replace('\\', '/');
//     }
// 
//     @Rule
//     public TestFailReporter failReporter= new TestFailReporter();
// 
//     public class TestFailReporter extends TestWatcher {
// 
//         @Override
//         protected void starting(Description description) {
//             System.out.println("STARTING " + description.toString());
//         }
//         @Override
//         protected void failed(Throwable e, Description description) {
//             System.out.println("FAIL in " + description.toString());
//             e.printStackTrace(System.out);
//         }
// 
//         @Override
//         protected void succeeded(Description description) {
//             System.out.println("PASS in " + description.toString());
//         }
//     }
// }


// Path: org.eclipselabs.plugindependencies.core.test/src/org/eclipselabs/plugindependencies/core/TestPluginParser.java
import static org.eclipselabs.plugindependencies.core.StringUtil.asList;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.jar.Manifest;
import org.eclipselabs.plugindependencies.core.fixture.BaseTest;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;

        PlatformState state = new PlatformState();
        Manifest mf = PluginParser.getManifest(plugin6);
        Plugin plugin = PluginParser.parseManifest(mf, state);
        assertEquals("org.company.workcenter", plugin.getName());
        assertEquals("6.3.1", plugin.getVersion());
        Set<Package> exported = new LinkedHashSet<>();
        Package package1 = new Package("com.package.test", "4.11.0");
        Package package2 = new Package("junit.framework", "4.11.0");
        Package package3 = new Package("junit.runner", "4.11.0");
        exported.add(package1);
        exported.add(package2);
        exported.add(package3);
        assertEquals(exported, plugin.getExportedPackages());
    }

    @Test
    public void testNull() throws IOException {
        pluginSet = new LinkedHashSet<>();
        packageSet = new LinkedHashSet<>();

        try {
            PlatformState state = new PlatformState(pluginSet, packageSet, null);
            new PluginParser(state).createPluginsAndAddToSet(null);
            fail();
        } catch (NullPointerException e) {
            // expected
        }
    }

    @Test
    public void testFolderDoesNotExist() throws IOException {