### Question:
Read implements PeripheralOperation<byte[]> { @Override public void execute(Peripheral peripheral) { peripheralRelay.accept(Optional.of(peripheral)); } Read(UUID svc, UUID chr, int timeoutMs); @Override final Single<byte[]> result(); @Override void execute(Peripheral peripheral); @Override Single<byte[]> executeWithResult(Peripheral peripheral);  }### Answer:
@Test public void read_timeout() { read.execute(peripheral); testScheduler.advanceTimeBy(5000 + 1000, TimeUnit.MILLISECONDS); readResultTestObserver.assertError(TimeoutException.class); }
@Test public void read_error() { read.execute(peripheral); readOperationSingle.onError(new PeripheralError(PeripheralError.Code.MISSING_CHARACTERISTIC)); readResultTestObserver.assertError(PeripheralError.class); }