// Path: src/main/java/io/reactivex/marble/ColdObservable.java
// public class ColdObservable<T> extends Observable<T> implements TestablePublisher<T> {
// 
//     private final TestablePublisher<T> publisher;
// 
//     protected ColdObservable(TestablePublisher<T> publisher) {
//         this.publisher = publisher;
//     }
// 
//     @Override
//     public void subscribe(Subscriber<? super T> s) {
//         publisher.subscribe(s);
//     }
// 
//     @Override
//     protected void subscribeActual(Observer<? super T> observer) {
//         publisher.subscribe(new ObserverAdapter<>(observer));
//     }
// 
//     @Override
//     public List<SubscriptionLog> getSubscriptions() {
//         return publisher.getSubscriptions();
//     }
// 
//     @Override
//     public List<Recorded<T>> getMessages() {
//         return publisher.getMessages();
//     }
// 
//     public static <T> ColdObservable<T> create(Scheduler scheduler, Recorded<T>... notifications) {
//         return create(scheduler, Arrays.asList(notifications));
//     }
// 
//     public static <T> ColdObservable<T> create(final Scheduler scheduler, List<Recorded<T>> notifications) {
// 
//         ColdPublisher<T> coldPublisher = new ColdPublisher<>(new SchedulerFactory() {
//             @Override
//             public org.reactivestreams.Scheduler create() {
//                 return new SchedulerAdapter(scheduler);
//             }
//         }, notifications);
// 
//         return new ColdObservable<>(coldPublisher);
//     }
// 
// }
// 
// Path: src/main/java/io/reactivex/marble/MapHelper.java
// public static <V> Map<String, V> of(String k, V v) {
//     return Collections.singletonMap(k,v);
// }
// 
// Path: src/main/java/io/reactivex/marble/junit/MarbleRule.java
// public class MarbleRule implements TestRule {
// 
//     private static ThreadLocal<MarbleScheduler> schedulerHolder = new ThreadLocal<>();
// 
//     public final MarbleScheduler scheduler;
// 
//     public MarbleRule() {
//         scheduler = new MarbleScheduler();
//     }
// 
//     public MarbleRule(long frameTimeFactor) {
//         scheduler = new MarbleScheduler(frameTimeFactor);
//     }
// 
//     public static <T> HotObservable<T> hot(String marbles, Map<String, T> values) {
//         return schedulerHolder.get().createHotObservable(marbles, values);
//     }
// 
//     public static HotObservable<String> hot(String marbles) {
//         return schedulerHolder.get().createHotObservable(marbles);
//     }
// 
//     public static <T> ColdObservable<T> cold(String marbles, Map<String, T> values) {
//         return schedulerHolder.get().createColdObservable(marbles, values);
//     }
// 
//     public static ColdObservable<String> cold(String marbles) {
//         return schedulerHolder.get().createColdObservable(marbles);
//     }
// 
//     public static ISetupTest expectObservable(Observable<?> actual) {
//         return schedulerHolder.get().expectObservable(actual);
//     }
// 
//     public static ISetupTest expectObservable(Observable<?> actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectObservable(actual, unsubscriptionMarbles);
//     }
// 
//     public static ISetupTest expectFlowable(Flowable<?> actual) {
//         return schedulerHolder.get().expectFlowable(actual);
//     }
// 
//     public static ISetupTest expectFlowable(Flowable<?> actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectFlowable(actual, unsubscriptionMarbles);
//     }
// 
//     public static ISetupTest expectSingle(Single<?> actual) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable());
//     }
// 
//     public static ISetupTest expectSingle(Single<?> actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable(), unsubscriptionMarbles);
//     }
// 
//     public static ISetupTest expectMaybe(Maybe<?> actual) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable());
//     }
// 
//     public static ISetupTest expectCompletable(Completable actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable(), unsubscriptionMarbles);
//     }
// 
//     public static ISetupTest expectCompletable(Completable actual) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable());
//     }
// 
//     public static ISetupTest expectMaybe(Maybe<?> actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectObservable(actual.toObservable(), unsubscriptionMarbles);
//     }
// 
//     public static ISetupSubscriptionsTest expectSubscriptions(List<SubscriptionLog> subscriptions) {
//         return schedulerHolder.get().expectSubscriptions(subscriptions);
//     }
// 
//     @Override
//     public Statement apply(final Statement base, Description description) {
//         return new Statement() {
//             @Override
//             public void evaluate() throws Throwable {
//                 schedulerHolder.set(scheduler);
//                 try {
//                     base.evaluate();
//                     scheduler.flush();
//                 } finally {
//                     schedulerHolder.remove();
//                 }
// 
//             }
//         };
//     }
// }


import io.reactivex.*;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.BiFunction;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.marble.ColdObservable;
import org.junit.Rule;
import org.junit.Test;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import static io.reactivex.marble.MapHelper.of;
import static io.reactivex.marble.junit.MarbleRule.*;
package io.reactivex.marble.junit;





public class DemoTest {

    @Rule
// Path: src/main/java/io/reactivex/marble/ColdObservable.java
// public class ColdObservable<T> extends Observable<T> implements TestablePublisher<T> {
// 
//     private final TestablePublisher<T> publisher;
// 
//     protected ColdObservable(TestablePublisher<T> publisher) {
//         this.publisher = publisher;
//     }
// 
//     @Override
//     public void subscribe(Subscriber<? super T> s) {
//         publisher.subscribe(s);
//     }
// 
//     @Override
//     protected void subscribeActual(Observer<? super T> observer) {
//         publisher.subscribe(new ObserverAdapter<>(observer));
//     }
// 
//     @Override
//     public List<SubscriptionLog> getSubscriptions() {
//         return publisher.getSubscriptions();
//     }
// 
//     @Override
//     public List<Recorded<T>> getMessages() {
//         return publisher.getMessages();
//     }
// 
//     public static <T> ColdObservable<T> create(Scheduler scheduler, Recorded<T>... notifications) {
//         return create(scheduler, Arrays.asList(notifications));
//     }
// 
//     public static <T> ColdObservable<T> create(final Scheduler scheduler, List<Recorded<T>> notifications) {
// 
//         ColdPublisher<T> coldPublisher = new ColdPublisher<>(new SchedulerFactory() {
//             @Override
//             public org.reactivestreams.Scheduler create() {
//                 return new SchedulerAdapter(scheduler);
//             }
//         }, notifications);
// 
//         return new ColdObservable<>(coldPublisher);
//     }
// 
// }
// 
// Path: src/main/java/io/reactivex/marble/MapHelper.java
// public static <V> Map<String, V> of(String k, V v) {
//     return Collections.singletonMap(k,v);
// }
// 
// Path: src/main/java/io/reactivex/marble/junit/MarbleRule.java
// public class MarbleRule implements TestRule {
// 
//     private static ThreadLocal<MarbleScheduler> schedulerHolder = new ThreadLocal<>();
// 
//     public final MarbleScheduler scheduler;
// 
//     public MarbleRule() {
//         scheduler = new MarbleScheduler();
//     }
// 
//     public MarbleRule(long frameTimeFactor) {
//         scheduler = new MarbleScheduler(frameTimeFactor);
//     }
// 
//     public static <T> HotObservable<T> hot(String marbles, Map<String, T> values) {
//         return schedulerHolder.get().createHotObservable(marbles, values);
//     }
// 
//     public static HotObservable<String> hot(String marbles) {
//         return schedulerHolder.get().createHotObservable(marbles);
//     }
// 
//     public static <T> ColdObservable<T> cold(String marbles, Map<String, T> values) {
//         return schedulerHolder.get().createColdObservable(marbles, values);
//     }
// 
//     public static ColdObservable<String> cold(String marbles) {
//         return schedulerHolder.get().createColdObservable(marbles);
//     }
// 
//     public static ISetupTest expectObservable(Observable<?> actual) {
//         return schedulerHolder.get().expectObservable(actual);
//     }
// 
//     public static ISetupTest expectObservable(Observable<?> actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectObservable(actual, unsubscriptionMarbles);
//     }
// 
//     public static ISetupTest expectFlowable(Flowable<?> actual) {
//         return schedulerHolder.get().expectFlowable(actual);
//     }
// 
//     public static ISetupTest expectFlowable(Flowable<?> actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectFlowable(actual, unsubscriptionMarbles);
//     }
// 
//     public static ISetupTest expectSingle(Single<?> actual) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable());
//     }
// 
//     public static ISetupTest expectSingle(Single<?> actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable(), unsubscriptionMarbles);
//     }
// 
//     public static ISetupTest expectMaybe(Maybe<?> actual) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable());
//     }
// 
//     public static ISetupTest expectCompletable(Completable actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable(), unsubscriptionMarbles);
//     }
// 
//     public static ISetupTest expectCompletable(Completable actual) {
//         return schedulerHolder.get().expectFlowable(actual.toFlowable());
//     }
// 
//     public static ISetupTest expectMaybe(Maybe<?> actual, String unsubscriptionMarbles) {
//         return schedulerHolder.get().expectObservable(actual.toObservable(), unsubscriptionMarbles);
//     }
// 
//     public static ISetupSubscriptionsTest expectSubscriptions(List<SubscriptionLog> subscriptions) {
//         return schedulerHolder.get().expectSubscriptions(subscriptions);
//     }
// 
//     @Override
//     public Statement apply(final Statement base, Description description) {
//         return new Statement() {
//             @Override
//             public void evaluate() throws Throwable {
//                 schedulerHolder.set(scheduler);
//                 try {
//                     base.evaluate();
//                     scheduler.flush();
//                 } finally {
//                     schedulerHolder.remove();
//                 }
// 
//             }
//         };
//     }
// }


// Path: src/test/java/io/reactivex/marble/junit/DemoTest.java
import io.reactivex.*;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.BiFunction;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.marble.ColdObservable;
import org.junit.Rule;
import org.junit.Test;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import static io.reactivex.marble.MapHelper.of;
import static io.reactivex.marble.junit.MarbleRule.*;

package io.reactivex.marble.junit;





public class DemoTest {

    @Rule
    public MarbleRule marble = new MarbleRule();