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

    try {
      testSource(resolveScopeFromLifecycle(lifecycle));
      throw new AssertionError(
          "Lifecycle resolution should have failed due to missing start " + "event");
    } catch (LifecycleNotStartedException ignored) {

    }
  }