@Test
public void TestRemoveObserver() {

    Observer<String> observer = new Observer<String>() {
        @Override
        public void onChanged(String value) {
            addResult(value);
        }
    };
    PublishSubject<String> observable = new PublishSubject<>();
    observable.subscribe(observer);
    observable.post("1");
    AssertResults("1");
    observable.removeObserver(observer);
    observable.post("2");
    AssertResults();
}