ComponentKitTests/CKComponentViewReuseTests.mm [143:181]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  __block UIView *viewThatEnteredReusePool = nil;

  CKComponent *innerComponent =
  CK::ComponentBuilder()
      .viewClass({
       &viewFactory,
       ^(UIView *v){ viewThatEnteredReusePool = v; },
       ^(UIView *v){ XCTFail(@"Didn't expect willLeaveReusePool"); }
     })
      .build();

  CKComponent *firstComponent =
  CK::CompositeComponentBuilder()
      .viewClass([UIView class])
      .component(innerComponent)
      .build();

  UIView *container = [[UIView alloc] init];
  CK::Component::ViewReuseUtilities::mountingInRootView(container);
  UIView *topLevelView;
  {
    ViewManager m(container);
    topLevelView = m.viewForConfiguration([firstComponent class], [firstComponent viewConfiguration]);
    {
      ViewManager m2(topLevelView);
      (void)m2.viewForConfiguration([innerComponent class], [innerComponent viewConfiguration]);
    }
  }

  CKComponent *secondComponent = CK::ComponentBuilder()
                                     .viewClass([UIImageView class])
                                     .build();
  {
    ViewManager m(container);
    (void)m.viewForConfiguration([secondComponent class], [secondComponent viewConfiguration]);
  }

  XCTAssertNotNil(viewThatEnteredReusePool, @"Expected view to enter reuse pool when its parent was hidden");
  XCTAssertFalse(viewThatEnteredReusePool.hidden, @"View that entered pool should not be hidden since its parent was");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



ComponentKitTests/CKComponentViewReuseTests.mm [187:225]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  __block UIView *viewThatEnteredReusePool = nil;

  CKComponent *innerComponent =
  CK::ComponentBuilder()
      .viewClass({
       &viewFactory,
       ^(UIView *v){ viewThatEnteredReusePool = v; },
       ^(UIView *v){ XCTFail(@"Didn't expect willLeaveReusePool"); }
     })
      .build();

  CKComponent *firstComponent =
  CK::CompositeComponentBuilder()
      .viewClass([UIView class])
      .component(innerComponent)
      .build();

  UIView *container = [[UIView alloc] init];
  CK::Component::ViewReuseUtilities::mountingInRootView(container);
  UIView *topLevelView;
  {
    ViewManager m(container);
    topLevelView = m.viewForConfiguration([firstComponent class], [firstComponent viewConfiguration]);
    {
      ViewManager m2(topLevelView);
      (void)m2.viewForConfiguration([innerComponent class], [innerComponent viewConfiguration]);
    }
  }

  CKComponent *secondComponent = CK::ComponentBuilder()
                                     .viewClass([UIImageView class])
                                     .build();
  {
    ViewManager m(container);
    (void)m.viewForConfiguration([secondComponent class], [secondComponent viewConfiguration]);
  }

  XCTAssertNotNil(viewThatEnteredReusePool, @"Expected view to enter reuse pool when its parent was hidden");
  XCTAssertFalse(viewThatEnteredReusePool.hidden, @"View that entered pool should not be hidden since its parent was");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



