@Test public void get() { while (Calendar.getInstance().get(Calendar.SECOND) > 55) thread.sleep(5, TimeUnit.Second); mockHelper.reset(); mockHelper.mock("/service-helper"); mockCarousel.reset(); mockCarousel.register("key", "{\"code\":0,\"data\":{\"id 1\":{\"id\":\"new id\",\"name\":\"carousel\"}}}"); JSONObject object = serviceHelper.get("id 1"); Assert.assertEquals(1, object.size()); Assert.assertEquals("id 1", object.getString("id")); mockCarousel.register("key.get", "{\"code\":0,\"data\":{\"id 1\":{\"id\":\"new id\",\"name\":\"carousel\"}}}"); object = serviceHelper.get("id 1"); Assert.assertEquals(2, object.size()); Assert.assertEquals("new id", object.getString("id")); Assert.assertEquals("carousel", object.getString("name")); }
public JSONObject get(String id) { if (getKey == null) getKey = getKey() + ".get"; return carousel.get(getKey, id); }
ServiceHelperSupport { public JSONObject get(String id) { if (getKey == null) getKey = getKey() + ".get"; return carousel.get(getKey, id); } }
ServiceHelperSupport { public JSONObject get(String id) { if (getKey == null) getKey = getKey() + ".get"; return carousel.get(getKey, id); }  }
ServiceHelperSupport { public JSONObject get(String id) { if (getKey == null) getKey = getKey() + ".get"; return carousel.get(getKey, id); }  JSONObject get(String id); JSONArray fill(JSONArray array, String[] names); }
ServiceHelperSupport { public JSONObject get(String id) { if (getKey == null) getKey = getKey() + ".get"; return carousel.get(getKey, id); }  JSONObject get(String id); JSONArray fill(JSONArray array, String[] names);  }