@Test
public void testBestModuleName() throws Exception {

    final File manifestWithOakpalModuleName = new File("src/test/resources/manifestWithOakpalModuleName.mf");
    final File manifestWithBundleSymbolicName = new File("src/test/resources/manifestWithBundleSymbolicName.mf");
    final File manifestWithAutomaticModuleName = new File("src/test/resources/manifestWithAutomaticModuleName.mf");
    final File manifestWithNoModuleName = new File("src/test/resources/manifestWithNoModuleName.mf");
    assertEquals(ChecklistPlanner.OAKPAL_MODULENAME + " takes precedence",
            "oakpal.moduleName",
            ChecklistPlanner.bestModuleName(manifestWithOakpalModuleName.toURI().toURL()));
    assertEquals(ChecklistPlanner.BUNDLE_SYMBOLICNAME + " takes precedence over AMN",
            "bundle.symbolicName",
            ChecklistPlanner.bestModuleName(manifestWithBundleSymbolicName.toURI().toURL()));
    assertEquals(ChecklistPlanner.AUTOMATIC_MODULE_NAME + " is last resort",
            "auto.module.name",
            ChecklistPlanner.bestModuleName(manifestWithAutomaticModuleName.toURI().toURL()));
    assertEquals("empty string if no header is present",
            "",
            ChecklistPlanner.bestModuleName(manifestWithNoModuleName.toURI().toURL()));
}