@SuppressWarnings("unchecked")
@Test
public void shouldCallOnNextAndOnCompleted() throws Exception {

    Callable<String> func = mock(Callable.class);
    when(func.call()).thenReturn("test_value");
    Observable<String> fromCallableObservable = Observable.fromCallable(func);
    Observer<Object> observer = TestHelper.mockObserver();
    fromCallableObservable.subscribe(observer);
    verify(observer).onNext("test_value");
    verify(observer).onComplete();
    verify(observer, never()).onError(any(Throwable.class));
}