CCSManageSvImpl implements ICCSManageSv { @Override public void modify(CCSOperationParam param, String data) throws PaasException { byte[] value = null; if (!StringUtil.isBlank(data)) { try { value = data.getBytes(PaaSConstant.CHARSET_UTF8); } catch (UnsupportedEncodingException e) { logger.error(e.getMessage(),e); throw new PaasException(ResourceUtil.getMessage(BundleKeyConstants.CONVERT_DATA_FAILED), e); } } modify(param, value); }  @Override void add(CCSOperationParam param, String data); @Override void add(CCSOperationParam param, byte[] data); @Override boolean exists(CCSOperationParam param); @Override void modify(CCSOperationParam param, String data); @Override void modify(CCSOperationParam param, byte[] data); @Override String get(CCSOperationParam param); @Override byte[] readBytes(CCSOperationParam param); @Override void delete(CCSOperationParam param); @Override List<String> listSubPath(CCSOperationParam param); @Override Map<String,String> listAllPath(CCSOperationParam param); List<String> formatPath(List<String> children,CCSOperationParam param); @Override List<CCSSubListDTO> listSubPathAndData(CCSOperationParam param); @Override List<String> getServices(CCSOperationParam param); Map<String, String> getResult(); void setResult(Map<String, String> result); static Map<String,String> result; }
@Test public void testModify() throws Exception { CCSOperationParam ccsOperationParam = new CCSOperationParam(); ccsOperationParam.setUserId(userId); ccsOperationParam.setServiceId(serviceId); ccsOperationParam.setPath("/test/testPath"); manageSv.modify(ccsOperationParam, "modify Value1"); assertTrue(manageSv.exists(ccsOperationParam)); assertEquals("modify Value1", manageSv.get(ccsOperationParam)); }