PriorityJsonParser implements JsonParser<Priority> { @Override public Priority parse(JSONObject json) throws JSONException { final BasicPriority basicPriority = basicPriorityJsonParser.parse(json); final String statusColor = json.getString("statusColor"); final String description = json.getString("description"); final URI iconUri = JsonParseUtil.parseURI(json.getString("iconUrl")); return new Priority(basicPriority.getSelf(), basicPriority.getName(), statusColor, description, iconUri); }  @Override Priority parse(JSONObject json);  }
@Test public void testParse() throws Exception { final PriorityJsonParser parser = new PriorityJsonParser(); final Priority priority = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/priority/complete.json")); Assert.assertEquals(new Priority(toUri("http: "#006600", "Minor loss of function, or other problem where easy workaround is present.", toUri("http: }