### Question:
ApplicationManifest { public String getVersion(String label) { return versions.get(label); } ApplicationManifest(Uri uri, Element xml); Uri getUri(); Uri getGadget(String version); String getVersion(String label); static final String NAMESPACE; }### Answer:
@Test public void getVersion() throws Exception { String xml = "<app xmlns='" + ApplicationManifest.NAMESPACE + "'>" + "<gadget>" + " <label>development</label>" + " <version>2.0</version>" + " <spec>whatever</spec>" + "</gadget>" + "<gadget>" + " <label>production</label>" + " <version>1.0</version>" + " <spec>whatever</spec>" + "</gadget></app>"; ApplicationManifest manifest = new ApplicationManifest(BASE_URI, XmlUtil.parse(xml)); assertEquals("1.0", manifest.getVersion("production")); assertEquals("2.0", manifest.getVersion("development")); }