StatusJsonParser implements JsonParser<Status> { @Override public Status parse(JSONObject json) throws JSONException { final BasicStatus basicStatus = basicStatusJsonParser.parse(json); final String description = json.getString("description"); final URI iconUri = JsonParseUtil.parseURI(json.getString("iconUrl")); return new Status(basicStatus.getSelf(), basicStatus.getName(), description, iconUri); }  @Override Status parse(JSONObject json);  }
@Test public void testParse() throws Exception { final StatusJsonParser parser = new StatusJsonParser(); final Status status = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/status/complete.json")); Assert.assertEquals(new Status(TestUtil.toUri("http: "Open", "The issue is open and ready for the assignee to start work on it.", TestUtil.toUri("http: }