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

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

    // Now we error
    RuntimeException expected = new RuntimeException("Expected");
    lifecycle.onError(expected);
    o.assertError(expected);
  }