### Question:
CmdProcessor { public Observable<Boolean> isIdle() { return idlePub.doOnEach(n -> { if (RXSDebug.isDebug()) Timber.tag(TAG).v("isIdle: %s", n);}); } CmdProcessor(Harvester.Factory factory); Single<Cmd.Result> submit(Cmd cmd); synchronized void attach(RxShell.Session session); Observable<Boolean> isIdle();  }### Answer:
@Test public void testIsIdle() { processor.isIdle().test().assertValueCount(1).assertNotComplete().assertValue(true); processor.attach(session); processor.isIdle().test().assertValueCount(1).assertNotComplete().assertValue(true); processor.submit(Cmd.builder("sleep 400").build()).subscribe(); await().atMost(1, TimeUnit.SECONDS).until(() -> processor.isIdle().blockingFirst(), is(false)); await().atMost(1, TimeUnit.SECONDS).until(() -> processor.isIdle().blockingFirst(), is(true)); }