package com.nhpatt.rxjava;

import org.junit.Test;
import rx.Observable;
import rx.Subscriber;

public class RxIsALibrary {

    @Test
    public void anObservableEmitsThings() {
        Observable<String> myObs = Observable.just("Hi!");

        Subscriber<String> mySubs = new Subscriber<String>() {
            @Override
            public void onCompleted() {
            }

            @Override
            public void onError(Throwable throwable) {

            }

            @Override
            public void onNext(String s) {
                System.out.println(s);
            }
        };

        myObs.subscribe(mySubs);
    }

}

@@ -87,16 +87,45 @@
 scriber;
+%0Aimport rx.functions.Action1;
 %0A%0Apublic
@@ -223,364 +223,31 @@
 able
-%3CString%3E myObs = Observable.just(%22Hi!%22);%0A%0A        Subscriber%3CString%3E mySubs = new Subscriber%3CString%3E() %7B%0A            @Override%0A            public void onCompleted() %7B%0A            %7D%0A%0A            @Override%0A            public void onError(Throwable throwable) %7B%0A%0A            %7D%0A%0A            @Override%0A            public void onNext(String s) %7B%0A                
+.just(%22Hi!%22).subscribe(
 Syst
@@ -256,77 +256,17 @@
 .out
-.
+::
 println
-(s);%0A            %7D%0A        %7D;%0A%0A        myObs.subscribe(mySubs
 );%0A 

simplify subscriber :)