@Test
public void testRemoveSubviewsFromContainerWithID() {

  UIManagerModule uiManager = getUIManagerModule();
  ReactRootView rootView =
      new ReactRootView(RuntimeEnvironment.application.getApplicationContext());
  int rootTag = uiManager.addRootView(rootView);
  final int containerTag = rootTag + 1;
  final int containerSiblingTag = containerTag + 1;
  uiManager.createView(
      containerTag,
      ReactViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));
  uiManager.createView(
      containerSiblingTag,
      ReactViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));
  addChild(uiManager, rootTag, containerTag, 0);
  addChild(uiManager, rootTag, containerSiblingTag, 1);
  uiManager.createView(
      containerTag + 2,
      ReactTextViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));
  uiManager.createView(
      containerTag + 3,
      ReactTextViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));
  addChild(uiManager, containerTag, containerTag + 2, 0);
  addChild(uiManager, containerTag, containerTag + 3, 1);
  uiManager.onBatchComplete();
  executePendingFrameCallbacks();
  assertThat(rootView.getChildCount()).isEqualTo(2);
  assertThat(((ViewGroup) rootView.getChildAt(0)).getChildCount()).isEqualTo(2);
  uiManager.removeSubviewsFromContainerWithID(containerTag);
  uiManager.onBatchComplete();
  executePendingFrameCallbacks();
  assertThat(rootView.getChildCount()).isEqualTo(2);
  assertThat(((ViewGroup) rootView.getChildAt(0)).getChildCount()).isEqualTo(0);
}