ResolutionJsonParser implements JsonParser<Resolution> { @Override public Resolution parse(JSONObject json) throws JSONException { final BasicResolution basicResolution = basicResolutionJsonParser.parse(json); final String description = json.getString("description"); return new Resolution(basicResolution.getSelf(), basicResolution.getName(), description); }  @Override Resolution parse(JSONObject json);  }
@Test public void testParse() throws Exception { final ResolutionJsonParser parser = new ResolutionJsonParser(); final Resolution resolution = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/resolution/complete.json")); Assert.assertEquals(new Resolution(toUri("http: "The problem is not completely described."), resolution); }