// Path: src/main/java/org/reactivestreams/ExpectSubscriptionsException.java
// public class ExpectSubscriptionsException extends RuntimeException {
// 
//     public ExpectSubscriptionsException(String message, String caller) {
//         super(message + "\n\n from assertion at " + caller + "\n\n----------------------\n");
//     }
// 
// }


import io.reactivex.BackpressureStrategy;
import io.reactivex.Flowable;
import io.reactivex.Observable;
import io.reactivex.Scheduler;
import io.reactivex.annotations.NonNull;
import io.reactivex.schedulers.TestScheduler;
import org.reactivestreams.*;
import org.reactivestreams.ExpectSubscriptionsException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

    public MarbleScheduler(long frameTimeFactor) {
        this.frameTimeFactor = frameTimeFactor;
        state = new PatchedSchedulerState(frameTimeFactor, new MarbleSchedulerState.ISchedule() {
            @Override
            public long now() {
                return MarbleScheduler.this.now(TimeUnit.MILLISECONDS);
            }

            @Override
            public void schedule(Runnable runnable, long time) {
                MarbleScheduler.this.createWorker().schedule(runnable, time, TimeUnit.MILLISECONDS);
            }
        }, getClass());
    }

    @Override
    public long now(@NonNull TimeUnit unit) {
        return testScheduler.now(unit);
    }

    public void advanceTimeBy(long delayTime, TimeUnit unit) {
        testScheduler.advanceTimeBy(delayTime, unit);
    }

    public void advanceTimeTo(long delayTime, TimeUnit unit) {
        testScheduler.advanceTimeTo(delayTime, unit);
    }

    public void triggerActions() {
// Path: src/main/java/org/reactivestreams/ExpectSubscriptionsException.java
// public class ExpectSubscriptionsException extends RuntimeException {
// 
//     public ExpectSubscriptionsException(String message, String caller) {
//         super(message + "\n\n from assertion at " + caller + "\n\n----------------------\n");
//     }
// 
// }


// Path: src/main/java/io/reactivex/marble/MarbleScheduler.java
import io.reactivex.BackpressureStrategy;
import io.reactivex.Flowable;
import io.reactivex.Observable;
import io.reactivex.Scheduler;
import io.reactivex.annotations.NonNull;
import io.reactivex.schedulers.TestScheduler;
import org.reactivestreams.*;
import org.reactivestreams.ExpectSubscriptionsException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;


    public MarbleScheduler(long frameTimeFactor) {
        this.frameTimeFactor = frameTimeFactor;
        state = new PatchedSchedulerState(frameTimeFactor, new MarbleSchedulerState.ISchedule() {
            @Override
            public long now() {
                return MarbleScheduler.this.now(TimeUnit.MILLISECONDS);
            }

            @Override
            public void schedule(Runnable runnable, long time) {
                MarbleScheduler.this.createWorker().schedule(runnable, time, TimeUnit.MILLISECONDS);
            }
        }, getClass());
    }

    @Override
    public long now(@NonNull TimeUnit unit) {
        return testScheduler.now(unit);
    }

    public void advanceTimeBy(long delayTime, TimeUnit unit) {
        testScheduler.advanceTimeBy(delayTime, unit);
    }

    public void advanceTimeTo(long delayTime, TimeUnit unit) {
        testScheduler.advanceTimeTo(delayTime, unit);
    }

    public void triggerActions() {
        testScheduler.triggerActions();