### Question:
WXSwitch extends WXComponent<WXSwitchView> { @Override protected boolean setProperty(String key, Object param) { switch (key) { case Constants.Name.CHECKED: Boolean result = WXUtils.getBoolean(param, null); if (result != null) { setChecked(result); } return true; } return super.setProperty(key, param); } @Deprecated  WXSwitch(WXSDKInstance instance, WXVContainer parent, String instanceId, boolean isLazy, BasicComponentData basicComponentData);  WXSwitch(final WXSDKInstance instance, WXVContainer parent, boolean isLazy, BasicComponentData basicComponentData); @Override void addEvent(String type); @WXComponentProp(name = Constants.Name.CHECKED) void setChecked(boolean checked);  }### Answer:
@Test public void testSetProperty() throws Exception { component.setProperty(Constants.Name.CHECKED,true); }