### Question:
WXDomStatement { void updateAttrs(String ref, final JSONObject attrs) { if (mDestroy) { return; } WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId); final WXDomObject domObject = mRegistry.get(ref); if (domObject == null) { if (instance != null) { instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_UPDATEATTRS); } return; } domObject.updateAttr(attrs); mNormalTasks.add(new IWXRenderTask() { @Override public void execute() { mWXRenderManager.updateAttrs(mInstanceId, domObject.getRef(), attrs); } @Override public String toString() { return "updateAttr"; } }); mDirty = true; if (instance != null) { instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS); } } WXDomStatement(String instanceId, WXRenderManager renderManager); void destroy(); static final String CHILDREN; static final String TYPE; }### Answer:
@Test public void testUpdateAttrs() throws Exception { createBody(); JSONObject obj; obj = new JSONObject(); obj.put("type","div"); obj.put("ref","100"); stmt.addDom(obj,WXDomObject.ROOT,0); stmt.updateAttrs("100",new JSONObject()); stmt.updateAttrs("100",null); stmt.batch(); }