### Question:
CynosureController extends Controller { @Action(method = HttpMethod.GET) public ActionResult refresh_provider(HttpContext context) { String path = context.Request.getParams().get("path"); logger.info("path:" + path); JsonResult jsonResult = cynosureService.queryProviderOrConsumerList(path); String result = JacksonUtils.toJson(jsonResult); logger.info("jsonResult:" + result); ActionResult actionResult = null; try { actionResult = new ActionResult(HttpDataType.JSON, result.getBytes(Constants.DEFAULT_CHARSET)); } catch (UnsupportedEncodingException e) { actionResult = new ActionResult(HttpDataType.JSON, result.getBytes()); logger.error(e); } return actionResult; }  @Action(method = HttpMethod.POST) ActionResult push_config(HttpContext context); @Action(method = HttpMethod.GET) ActionResult refresh_conf(HttpContext context); @Action(method = HttpMethod.GET) ActionResult refresh_service(HttpContext context); @Action(method = HttpMethod.GET) ActionResult refresh_consumer(HttpContext context); @Action(method = HttpMethod.GET) ActionResult refresh_provider(HttpContext context); @Action(method = HttpMethod.POST) ActionResult del_data(HttpContext context);  }### Answer:
@Test public void refresh_provider_statusTest(){ ConfigManager.getInstance().put(ConfigManager.KEY_ZKSTR,server.getConnectString()); ZkHelper zkHelper = ZkInstanceUtil.getInstance(); zkHelper.addPersistent("/root/data/a/data","{\"a\":1}"); zkHelper.addPersistent("/root/data/b/data","{\"a\":2}"); zkHelper.addPersistent("/root/data/c/data","{\"a\":3}"); String path = "/root/data"; String version = "9999"; String nodeData = "abc123456"; byte[] dataByte = null; try { byte[] versionBytes = version.getBytes(Constants.DEFAULT_CHARSET); byte[] pre = ByteUtil.intToByteArray(versionBytes.length); dataByte = ByteUtil.byteMerge(pre, versionBytes); dataByte = ByteUtil.byteMerge(dataByte, nodeData.getBytes()); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } zkHelper.addOrUpdatePersistentNode(path, dataByte); CynosureController cynosureController = new CynosureController(); HttpContext context = new HttpContext(UUID.randomUUID().toString()); Map<String, String> params = new HashMap<>(); params.put("path","/root"); context.Request.setParams(params); ActionResult result = null; result = cynosureController.refresh_provider(context); Assert.assertNotNull(result.getData()); byte[] data = result.getData(); String str = null; try { str = new String(data, Constants.DEFAULT_CHARSET); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } JsonResult jsonResult = JacksonUtils.toObject(str,JsonResult.class); ArrayList list = (ArrayList) jsonResult.getData().get("pathList"); Assert.assertEquals(((Map) list.get(0)).get("data"),nodeData); Assert.assertEquals(((Map) list.get(0)).get("pushId"),version); }