### Question:
WXListComponent extends BasicListComponent<BounceRecyclerView> { @Override public void addChild(final WXComponent child, int index) { super.addChild(child, index); if (child == null || index < -1) { return; } if (child instanceof WXRefresh && getHostView() != null) { getHostView().setOnRefreshListener((WXRefresh) child); getHostView().postDelayed(WXThread.secure(new Runnable() { @Override public void run() { getHostView().setHeaderView(child); } }), 100); } if (child instanceof WXLoading && getHostView() != null) { getHostView().setOnLoadingListener((WXLoading) child); getHostView().postDelayed(WXThread.secure(new Runnable() { @Override public void run() { getHostView().setFooterView(child); } }), 100); } if(mRecyclerDom != null && getHostView() != null && (mColumnWidth != mRecyclerDom.getColumnWidth() || mColumnCount != mRecyclerDom.getColumnCount() || mColumnGap != mRecyclerDom.getColumnGap())) { updateRecyclerAttr(); getHostView().getInnerView().initView(getContext(), mLayoutType,mColumnCount,mColumnGap,getOrientation()); } } @Deprecated  WXListComponent(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy);  WXListComponent(WXSDKInstance instance, WXDomObject node, WXVContainer parent, boolean lazy); @Override void addChild(final WXComponent child, int index); @WXComponentProp(name = Constants.Name.LEFT_GAP) void setLeftGap(float leftGap); @WXComponentProp(name = Constants.Name.RIGHT_GAP) void setRightGap(float rightGap); @WXComponentProp(name = Constants.Name.COLUMN_WIDTH) void setColumnWidth(int columnCount); @WXComponentProp(name = Constants.Name.COLUMN_COUNT) void setColumnCount(int columnCount); @WXComponentProp(name = Constants.Name.COLUMN_GAP) void setColumnGap(float columnGap); @WXComponentProp(name = Constants.Name.SCROLLABLE) void setScrollable(boolean scrollable); @Override void updateProperties(Map<String, Object> props); @Override void createChildViewAt(int index); WXRecyclerDomObject getRecyclerDom(); void remove(WXComponent child, boolean destroy);  }### Answer:
@Test public void testAddChild() throws Exception { WXComponent child = WXDivTest.create(component); ComponentTest.create(child); component.addChild(child); child = WXHeaderTest.create(component); ComponentTest.create(child); component.addChild(child); }
@Test public void testScrollTo() throws Exception { WXComponent child = WXDivTest.create(component); ComponentTest.create(child); component.addChild(child); child = WXHeaderTest.create(component); ComponentTest.create(child); component.addChild(child); Map<String, Object> options = new HashMap<>(2); options.put("offset", 10); options.put("animated", false); component.scrollTo(child,options); }
@Test public void testAppear() throws Exception { WXComponent child = WXDivTest.create(component); ComponentTest.create(child); component.addChild(child); component.bindAppearEvent(child); component.notifyAppearStateChange(0,0,0,10); }