@Test
public void testLastOrDefault() {

    BlockingObservable<Integer> observable = BlockingObservable.from(Observable.from(1, 0, -1));
    int last = observable.lastOrDefault(-100, new Func1<Integer, Boolean>() {
        @Override
        public Boolean call(Integer args) {
            return args >= 0;
        }
    });
    assertEquals(0, last);
}