IssueTypeJsonParser implements JsonParser<IssueType> { @Override public IssueType parse(JSONObject json) throws JSONException { final BasicIssueType basicIssueType = basicIssueTypeJsonParser.parse(json); final URI iconUri = JsonParseUtil.parseURI(json.getString("iconUrl")); final String description = json.optString("description"); return new IssueType(basicIssueType.getSelf(), basicIssueType.getName(), basicIssueType.isSubtask(), description, iconUri); }  @Override IssueType parse(JSONObject json);  }
@Test public void testParse() throws JSONException { IssueTypeJsonParser parser = new IssueTypeJsonParser(); final IssueType issueType = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/issueType/complete.json")); assertEquals(new IssueType(toUri("http: "A problem which impairs or prevents the functions of the product.", TestUtil.toUri("http: }