ManifestHeaderProcessor { public static List<String> split(String value, String delimiter) { return ManifestHeaderUtils.split(value, delimiter); }  static List<String> split(String value, String delimiter); static List<NameValuePair> parseExportString(String s); static List<NameValuePair> parseExportList(List<String> list); static Map<String, Map<String, String>> parseImportString(String s); static List<GenericMetadata> parseCapabilityString(String s); static List<GenericMetadata> parseRequirementString(String s); static NameValuePair parseBundleSymbolicName(String s); static VersionRange parseVersionRange(String s); static VersionRange parseVersionRange(String s, boolean exactVersion); static String generateFilter(Map<String, String> attribs); static String generateFilter(String type, String name,
      Map<String, String> attribs); static Map<String,String> parseFilter(String filter); static final String NESTED_FILTER_ATTRIBUTE; }
@Test public void testSplit() throws Exception { String export = "com.ibm.ws.eba.obr.fep.bundle122;version=\"3\";company=mood;local=yes;security=yes;mandatory:=\"mood,security\""; List<String> result = ManifestHeaderProcessor.split(export, ","); assertEquals("The result is wrong.", export, result.get(0)); assertEquals("The result is wrong.", 1, result.size()); String aString = "com.acme.foo;weirdAttr=\"one;two;three\";weirdDir:=\"1;2;3\""; result = ManifestHeaderProcessor.split(aString, ";"); assertEquals("The result is wrong.", "com.acme.foo", result.get(0)); assertEquals("The result is wrong.", "weirdAttr=\"one;two;three\"", result.get(1)); assertEquals("The result is wrong.", "weirdDir:=\"1;2;3\"", result.get(2)); assertEquals("The result is wrong.", 3, result.size()); String pkg1 = "com.ibm.ws.eba.example.helloIsolation;version=\"1.0.0\" "; String pkg2 = "com.ibm.ws.eba.helloWorldService;version=\"[1.0.0,1.0.0]\""; String pkg3 = " com.ibm.ws.eba.helloWorldService;version=\"1.0.0\""; String pkg4 = "com.ibm.ws.eba.helloWorldService;version=\"[1.0.0,1.0.0]\";sharing:=shared" ; String pkg5 = "com.ibm.ws.eba.helloWorldService;sharing:=shared;version=\"[1.0.0,1.0.0]\""; String appContent1 = pkg1 + ", " + pkg2 + ", " + pkg3; String appContent2 = pkg2 + ", " + pkg1 + ", " + pkg3; String appContent3 = pkg1 + ", " + pkg3 + ", " + pkg2; String appContent4 = pkg1 + ", " + pkg3 + ", " + pkg4; String appContent5 = pkg1 + ", " + pkg3 + ", " + pkg5; List<String> splitList = ManifestHeaderProcessor.split(appContent1, ","); assertEquals(pkg1.trim(), splitList.get(0)); assertEquals(pkg2.trim(), splitList.get(1)); assertEquals(pkg3.trim(), splitList.get(2)); splitList = ManifestHeaderProcessor.split(appContent2, ","); assertEquals(pkg2.trim(), splitList.get(0)); assertEquals(pkg1.trim(), splitList.get(1)); assertEquals(pkg3.trim(), splitList.get(2)); splitList = ManifestHeaderProcessor.split(appContent3, ","); assertEquals(pkg1.trim(), splitList.get(0)); assertEquals(pkg3.trim(), splitList.get(1)); assertEquals(pkg2.trim(), splitList.get(2)); splitList = ManifestHeaderProcessor.split(appContent4, ","); assertEquals(pkg1.trim(), splitList.get(0)); assertEquals(pkg3.trim(), splitList.get(1)); assertEquals(pkg4.trim(), splitList.get(2)); splitList = ManifestHeaderProcessor.split(appContent5, ","); assertEquals(pkg1.trim(), splitList.get(0)); assertEquals(pkg3.trim(), splitList.get(1)); assertEquals(pkg5.trim(), splitList.get(2)); }