### Question:
SystemExports { public String getFullExport(String pkg) { if (exports.containsKey(pkg)) { Map<String, String> attrs = new HashMap<String, String>(exports.get(pkg)); if (attrs.containsKey("version")) { final String version = attrs.get("version"); attrs.put("version", "[" + version + "," + version + "]"); } return OsgiHeaderUtil.buildHeader(pkg, attrs); } return pkg; } SystemExports(String exportsLine); String getFullExport(String pkg); boolean isExported(String pkg); static final SystemExports NONE; }### Answer:
@Test public void testExportPackageWithVersion() { SystemExports exports = new SystemExports("foo.bar;version=\"4.0\""); assertEquals("foo.bar;version=\"[4.0,4.0]\"", exports.getFullExport("foo.bar")); assertEquals("foo.baz", exports.getFullExport("foo.baz")); }