// Path: src/main/java/com/plexobject/rx/scheduler/Scheduler.java
// public interface Scheduler extends Disposable {
//     /**
//      * This method registers user-defined function that is invoked by scheduler
//      * 
//      * @param consumer
//      *            - callback function to notify tick
//      * @param handle
//      *            to pass in with consumer
//      */
//     <T> void scheduleBackgroundTask(Consumer<T> consumer, T handle);
// 
//     public static Scheduler newThreadPoolScheduler(int poolSize) {
//         return new ThreadPoolScheduler(poolSize);
//     }
// 
//     public static Scheduler newImmediateScheduler() {
//         return new ImmediateScheduler();
//     }
// 
//     public static Scheduler newNewThreadScheduler() {
//         return new NewThreadScheduler();
//     }
// 
//     public static Scheduler newTimerSchedulerWithMilliInterval(long interval) {
//         return new TimerScheduler(interval);
//     }
// }


import java.util.function.Consumer;
import mockit.Mocked;
import mockit.Verifications;
import mockit.integration.junit4.JMockit;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.plexobject.rx.scheduler.Scheduler;
package com.plexobject.rx;





@RunWith(JMockit.class)
public class ObservableCountTest {
    @Mocked
    private Consumer<Long> onNext;
    @Mocked
    private Consumer<Throwable> onError;
    @Mocked
    private OnCompletion onCompleted;

    @Test
    public void testSubscribeCount() throws Exception {
        Observable<Long> observable = Observable.from(1, 2, 3, 4, 5)
// Path: src/main/java/com/plexobject/rx/scheduler/Scheduler.java
// public interface Scheduler extends Disposable {
//     /**
//      * This method registers user-defined function that is invoked by scheduler
//      * 
//      * @param consumer
//      *            - callback function to notify tick
//      * @param handle
//      *            to pass in with consumer
//      */
//     <T> void scheduleBackgroundTask(Consumer<T> consumer, T handle);
// 
//     public static Scheduler newThreadPoolScheduler(int poolSize) {
//         return new ThreadPoolScheduler(poolSize);
//     }
// 
//     public static Scheduler newImmediateScheduler() {
//         return new ImmediateScheduler();
//     }
// 
//     public static Scheduler newNewThreadScheduler() {
//         return new NewThreadScheduler();
//     }
// 
//     public static Scheduler newTimerSchedulerWithMilliInterval(long interval) {
//         return new TimerScheduler(interval);
//     }
// }


// Path: src/test/java/com/plexobject/rx/ObservableCountTest.java
import java.util.function.Consumer;
import mockit.Mocked;
import mockit.Verifications;
import mockit.integration.junit4.JMockit;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.plexobject.rx.scheduler.Scheduler;

package com.plexobject.rx;





@RunWith(JMockit.class)
public class ObservableCountTest {
    @Mocked
    private Consumer<Long> onNext;
    @Mocked
    private Consumer<Throwable> onError;
    @Mocked
    private OnCompletion onCompleted;

    @Test
    public void testSubscribeCount() throws Exception {
        Observable<Long> observable = Observable.from(1, 2, 3, 4, 5)
                .subscribeOn(Scheduler.newImmediateScheduler()).count();