@Test public void subscribe_shouldSetDisposable() throws Exception { ObservableEmitter<ConnectionStatus> e = mock(ObservableEmitter.class); emitter.subscribe(e); verify(e).setDisposable(emitter); }
@Override public void subscribe(final ObservableEmitter<ConnectionStatus> emitter) throws Exception { this.emitter = emitter; emitter.setDisposable(this); client.registerConnectionCallbacks(this); client.connect(); }
DisposableConnectionStatusEmitter implements ObservableOnSubscribe<ConnectionStatus>,
    Disposable, LostApiClient.ConnectionCallbacks { @Override public void subscribe(final ObservableEmitter<ConnectionStatus> emitter) throws Exception { this.emitter = emitter; emitter.setDisposable(this); client.registerConnectionCallbacks(this); client.connect(); } }
DisposableConnectionStatusEmitter implements ObservableOnSubscribe<ConnectionStatus>,
    Disposable, LostApiClient.ConnectionCallbacks { @Override public void subscribe(final ObservableEmitter<ConnectionStatus> emitter) throws Exception { this.emitter = emitter; emitter.setDisposable(this); client.registerConnectionCallbacks(this); client.connect(); } DisposableConnectionStatusEmitter(LostApiClient client); }
DisposableConnectionStatusEmitter implements ObservableOnSubscribe<ConnectionStatus>,
    Disposable, LostApiClient.ConnectionCallbacks { @Override public void subscribe(final ObservableEmitter<ConnectionStatus> emitter) throws Exception { this.emitter = emitter; emitter.setDisposable(this); client.registerConnectionCallbacks(this); client.connect(); } DisposableConnectionStatusEmitter(LostApiClient client); @Override void subscribe(final ObservableEmitter<ConnectionStatus> emitter); @Override void dispose(); @Override boolean isDisposed(); @Override void onConnected(); @Override void onConnectionSuspended(); }
DisposableConnectionStatusEmitter implements ObservableOnSubscribe<ConnectionStatus>,
    Disposable, LostApiClient.ConnectionCallbacks { @Override public void subscribe(final ObservableEmitter<ConnectionStatus> emitter) throws Exception { this.emitter = emitter; emitter.setDisposable(this); client.registerConnectionCallbacks(this); client.connect(); } DisposableConnectionStatusEmitter(LostApiClient client); @Override void subscribe(final ObservableEmitter<ConnectionStatus> emitter); @Override void dispose(); @Override boolean isDisposed(); @Override void onConnected(); @Override void onConnectionSuspended();  }