### Question:
WXWeb extends WXComponent { public void setAction(String action, Object data) { if (!TextUtils.isEmpty(action)) { if (action.equals(GO_BACK)) { goBack(); } else if (action.equals(GO_FORWARD)) { goForward(); } else if (action.equals(RELOAD)) { reload(); } else if (action.equals(POST_MESSAGE)) { postMessage(data); } } } @Deprecated  WXWeb(WXSDKInstance instance, WXVContainer parent, String instanceId, boolean isLazy, BasicComponentData basicComponentData);  WXWeb(WXSDKInstance instance, WXVContainer parent, boolean isLazy, BasicComponentData basicComponentData); @Override void destroy(); @WXComponentProp(name = Constants.Name.SHOW_LOADING) void setShowLoading(boolean showLoading); @WXComponentProp(name = Constants.Name.SRC) void setUrl(String url); @WXComponentProp(name = Constants.Name.SOURCE) void setSource(String source); void setAction(String action, Object data); @JSMethod void reload(); @JSMethod void goForward(); @JSMethod void goBack(); @JSMethod void postMessage(Object msg); static final String GO_BACK; static final String GO_FORWARD; static final String RELOAD; static final String POST_MESSAGE; }### Answer:
@Test public void testSetAction() throws Exception { Map<String, Object> msg = new HashMap<>(); msg.put("test1", 1); msg.put("test2", "2"); component.setAction(WXWeb.GO_BACK, null); component.setAction(WXWeb.GO_FORWARD, null); component.setAction(WXWeb.RELOAD, null); component.setAction(WXWeb.POST_MESSAGE, msg); }