@Test
public void testParseImportString()
{

  String importPackage = "com.acme.foo,come.acm.e.bar;version=\"[1.23,1.24.5]\";resolution:=mandatory;company=\"ACME\",a.b.c;version=1.2.3;company=com";
  Map<String, Map<String, String>> importPackageReturn = ManifestHeaderProcessor.parseImportString(importPackage);
  assertTrue("The package is not set.", importPackageReturn.containsKey("com.acme.foo"));
  assertTrue("The package is not set.", importPackageReturn.containsKey("come.acm.e.bar"));
  assertTrue("The package is not set.", importPackageReturn.containsKey("come.acm.e.bar"));
  assertTrue("The package is not set.", importPackageReturn.containsKey("a.b.c"));
  assertTrue("The package should not contain any attributes.", importPackageReturn.get("com.acme.foo").isEmpty());
  assertEquals("The directive is not set correctly.", "[1.23,1.24.5]", importPackageReturn.get("come.acm.e.bar").get("version"));
  assertEquals("The directive is not set correctly.", "mandatory", importPackageReturn.get("come.acm.e.bar").get("resolution:"));
  assertEquals("The directive is not set correctly.", "ACME", importPackageReturn.get("come.acm.e.bar").get("company"));
  assertEquals("The directive is not set correctly.", "1.2.3", importPackageReturn.get("a.b.c").get("version"));
  assertEquals("The directive is not set correctly.", "com", importPackageReturn.get("a.b.c").get("company"));
  importPackage="com.acme.foo";
  assertTrue("The package is not set.", importPackageReturn.containsKey("com.acme.foo"));
  assertTrue("The package should not contain any attributes.", importPackageReturn.get("com.acme.foo").isEmpty());
  importPackage="com.acme.foo;com.acme.bar;version=2";
  Map<String, Map<String, String>> importPackageReturn2 = ManifestHeaderProcessor.parseImportString(importPackage);
  assertTrue("The package is not set.", importPackageReturn2.containsKey("com.acme.foo"));
  assertTrue("The package is not set.", importPackageReturn2.containsKey("com.acme.bar"));
  assertEquals("The directive is not set correctly.", "2", importPackageReturn2.get("com.acme.foo").get("version"));
  assertEquals("The directive is not set correctly.", "2", importPackageReturn2.get("com.acme.bar").get("version"));
}