// Path: src/main/java/com/github/davidmoten/rx2/observable/CloseableObservableWithReset.java
// public final class CloseableObservableWithReset<T> {
// 
//     private final Observable<T> observable;
//     private final Runnable closeAction;
//     private final Runnable resetAction;
// 
//     public CloseableObservableWithReset(Observable<T> observable, Runnable closeAction, Runnable resetAction) {
//         this.observable = observable;
//         this.closeAction = closeAction;
//         this.resetAction = resetAction;
//     }
// 
//     public Observable<T> observable() {
//         return observable;
//     }
// 
//     public void reset() {
//         resetAction.run();
//     }
// 
//     public void close() {
//         closeAction.run();
//     }
// 
// }


import com.github.davidmoten.junit.Asserts;
import com.github.davidmoten.rx2.observable.CloseableObservableWithReset;
import io.reactivex.Flowable;
import io.reactivex.Observable;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import org.junit.Test;
import org.reactivestreams.Subscription;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import static org.junit.Assert.assertTrue;
package com.github.davidmoten.rx2;




public class ObservablesTest {

    @Test
    public void isUtilityClass() {
        Asserts.assertIsUtilityClass(Observables.class);
    }

    @Test
    public void testCache() {

        final AtomicInteger subscriptionCount = new AtomicInteger(0);

        Flowable<String> source = Flowable.just("Alpha", "Beta", "Gamma", "Delta", "Epsilon");

// Path: src/main/java/com/github/davidmoten/rx2/observable/CloseableObservableWithReset.java
// public final class CloseableObservableWithReset<T> {
// 
//     private final Observable<T> observable;
//     private final Runnable closeAction;
//     private final Runnable resetAction;
// 
//     public CloseableObservableWithReset(Observable<T> observable, Runnable closeAction, Runnable resetAction) {
//         this.observable = observable;
//         this.closeAction = closeAction;
//         this.resetAction = resetAction;
//     }
// 
//     public Observable<T> observable() {
//         return observable;
//     }
// 
//     public void reset() {
//         resetAction.run();
//     }
// 
//     public void close() {
//         closeAction.run();
//     }
// 
// }


// Path: src/test/java/com/github/davidmoten/rx2/ObservablesTest.java
import com.github.davidmoten.junit.Asserts;
import com.github.davidmoten.rx2.observable.CloseableObservableWithReset;
import io.reactivex.Flowable;
import io.reactivex.Observable;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import org.junit.Test;
import org.reactivestreams.Subscription;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import static org.junit.Assert.assertTrue;

package com.github.davidmoten.rx2;




public class ObservablesTest {

    @Test
    public void isUtilityClass() {
        Asserts.assertIsUtilityClass(Observables.class);
    }

    @Test
    public void testCache() {

        final AtomicInteger subscriptionCount = new AtomicInteger(0);

        Flowable<String> source = Flowable.just("Alpha", "Beta", "Gamma", "Delta", "Epsilon");

        final CloseableObservableWithReset<List<String>> closeable = Observables