### Question:
CorePeripheralManager implements PeripheralManager { @Override public Observable<Boolean> connected() { return peripheralRelay.switchMap(Peripheral::connected).startWith(false); }  @Override void setPeripheral(Peripheral peripheral); @Override Single<T> queueOperation(PeripheralOperation<T> peripheralOperation); @Override Observable<Boolean> connected(); @Override Observable<byte[]> notification(UUID characteristic);  }### Answer:
@Test public void connected() { when(peripheral.connected()).thenReturn(connectedRelay.hide()); TestObserver<Boolean> connectedTestObserver = corePeripheralManager.connected().test(); connectedRelay.accept(true); connectedTestObserver.assertValues(false, true); }