@Test
public void testExportMandatoryAttributes() {

  String exportPackage = "com.acme.foo,com.acme.bar;version=2;company=dodo;security=false;mandatory:=\"security,company\"";
  List<NameValuePair> exportPackageReturn = ManifestHeaderProcessor.parseExportString(exportPackage);
  int i =0;
  assertEquals("The number of the packages is wrong.", 2, exportPackageReturn.size());
  for (NameValuePair nvp : exportPackageReturn) {
    if (nvp.getName().equals("com.acme.foo")) {
      i++;
      assertTrue("The directive or attribute should not be set.", nvp.getAttributes().isEmpty() );
    } else if ((nvp.getName().equals("com.acme.bar")) && ("2".equals(nvp.getAttributes().get("version")))) {
      i++;
      assertEquals("The directive is wrong.", "dodo", nvp.getAttributes().get("company"));
      assertEquals("The directive is wrong.", "false", nvp.getAttributes().get("security"));
      assertEquals("The directive is wrong.", "security,company", nvp.getAttributes().get("mandatory:"));
    }
  }
  // make sure all three packages stored
  assertEquals("The names of the packages are wrong.", 2, i);
}