@Test public void hasSensePaired() throws Exception { final ArrayList<SenseDevice> senseDeviceList = new ArrayList<>(1); senseDeviceList.add(createSense(DateTime.now())); final Devices devicesList = new Devices(senseDeviceList, new ArrayList<>(0)); final Boolean result = Sync.wrap(sleepSoundsInteractor.hasSensePaired(devicesList)).last(); assertThat(result, equalTo(true)); senseDeviceList.clear(); senseDeviceList.add(createSense(DateTime.now().minusMinutes(30))); final Boolean resultWithMissingSense = Sync.wrap(sleepSoundsInteractor.hasSensePaired(devicesList)).last(); assertThat(resultWithMissingSense, equalTo(true)); }
public Observable<Boolean> hasSensePaired() { return apiService.registeredDevices() .flatMap(SleepSoundsInteractor.this::hasSensePaired); }
SleepSoundsInteractor extends ScopedValueInteractor<SleepSoundsStateDevice> { public Observable<Boolean> hasSensePaired() { return apiService.registeredDevices() .flatMap(SleepSoundsInteractor.this::hasSensePaired); } }
SleepSoundsInteractor extends ScopedValueInteractor<SleepSoundsStateDevice> { public Observable<Boolean> hasSensePaired() { return apiService.registeredDevices() .flatMap(SleepSoundsInteractor.this::hasSensePaired); }  }
SleepSoundsInteractor extends ScopedValueInteractor<SleepSoundsStateDevice> { public Observable<Boolean> hasSensePaired() { return apiService.registeredDevices() .flatMap(SleepSoundsInteractor.this::hasSensePaired); }  @Nullable @Override Bundle onSaveState(); Observable<VoidResponse> play(final @NonNull SleepSoundActionPlay actionPlay); Observable<VoidResponse> stop(final @NonNull SleepSoundActionStop actionStop); Observable<Boolean> hasSensePaired(); }
SleepSoundsInteractor extends ScopedValueInteractor<SleepSoundsStateDevice> { public Observable<Boolean> hasSensePaired() { return apiService.registeredDevices() .flatMap(SleepSoundsInteractor.this::hasSensePaired); }  @Nullable @Override Bundle onSaveState(); Observable<VoidResponse> play(final @NonNull SleepSoundActionPlay actionPlay); Observable<VoidResponse> stop(final @NonNull SleepSoundActionStop actionStop); Observable<Boolean> hasSensePaired(); final InteractorSubject<SleepSoundsStateDevice> combinedState; }