public static <@NonNull E> CompletableSource resolveScopeFromLifecycle(
      final LifecycleScopeProvider<E> provider) throws OutsideScopeException {
    return resolveScopeFromLifecycle(provider, true);
  }
@Test
  public void resolveScopeFromLifecycle_normal_notComparable() {
    PublishSubject<IntHolder> lifecycle = PublishSubject.create();

    TestObserver<?> o = testSource(resolveScopeFromLifecycle(lifecycle, new IntHolder(3)));

    lifecycle.onNext(new IntHolder(0));
    o.assertNoErrors().assertNotComplete();
    lifecycle.onNext(new IntHolder(1));
    o.assertNoErrors().assertNotComplete();
    lifecycle.onNext(new IntHolder(0));
    o.assertNoErrors().assertNotComplete();
    lifecycle.onNext(new IntHolder(2));
    o.assertNoErrors().assertNotComplete();

    // Now we end
    lifecycle.onNext(new IntHolder(3));
    o.assertComplete();
  }