### Question:
RegisterNotification implements PeripheralOperation<Irrelevant> { @Override public void execute(Peripheral peripheral) { peripheralRelay.accept(Optional.of(peripheral)); } RegisterNotification(UUID svc, UUID chr, int timeoutMs);  RegisterNotification(
          UUID svc, UUID chr, @Nullable Peripheral.Preprocessor preprocessor, int timeoutMs); @Override Single<Irrelevant> result(); @Override void execute(Peripheral peripheral); @Override Single<Irrelevant> executeWithResult(Peripheral peripheral);  }### Answer:
@Test public void register_timeout() { registerNotification.execute(peripheral); testScheduler.advanceTimeBy(5000 + 1000, TimeUnit.MILLISECONDS); registerResultTestObserver.assertError(TimeoutException.class); }
@Test public void register_error() { registerNotification.execute(peripheral); registerCompletable.onError(new PeripheralError(PeripheralError.Code.MISSING_CHARACTERISTIC)); registerResultTestObserver.assertError(PeripheralError.class); }