Attribute[] attribute = new Attribute[0];
Clause clause = new Clause("org.apache.karaf.test", directive, attribute);
assertFalse(ManifestUtils.isOptional(clause));
directive = new Directive[1];
directive[0] = new Directive("resolution", "mandatory");
clause = new Clause("org.apache.karaf.test", directive, attribute);
assertFalse(ManifestUtils.isOptional(clause));
directive[0] = new Directive("resolution", "optional");
clause = new Clause("org.apache.karaf.test", directive, attribute);
assertTrue(ManifestUtils.isOptional(clause));
}