Creates a TestObserver and subscribes it to this Maybe. Scheduler: test does not operate by default on a particular Scheduler. @return the new TestObserver instance
()
| 6073 | * @return the new {@code TestObserver} instance |
| 6074 | */ |
| 6075 | @CheckReturnValue |
| 6076 | @SchedulerSupport(SchedulerSupport.NONE) |
| 6077 | @NonNull |
| 6078 | public final TestObserver<T> test() { |
| 6079 | TestObserver<T> to = new TestObserver<>(); |
| 6080 | subscribe(to); |
| 6081 | return to; |
| 6082 | } |
| 6083 | |
| 6084 | /** |
| 6085 | * Creates a {@link TestObserver} optionally in cancelled state, then subscribes it to this {@code Maybe}. |