BasicProjectJsonParser implements JsonParser<BasicProject> { @Override public BasicProject parse(JSONObject json) throws JSONException { final URI selfUri = JsonParseUtil.getSelfUri(json); final String key = json.getString("key"); final String name = JsonParseUtil.getOptionalString(json, "name"); return new BasicProject(selfUri, key, name); }  @Override BasicProject parse(JSONObject json);  }
@Test public void testParse() throws Exception { BasicProjectJsonParser parser = new BasicProjectJsonParser(); final BasicProject project = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/project/basic.json")); assertEquals(TestUtil.toUri("http: assertEquals("RST", project.getKey()); }