### Question:
CheckConnectionUseCase { public Completable executeCompletable() { return wlanRepository.isConnectedToWiFi() .map(isConnected -> { if (!isConnected) { throw new NetworkDisconnectedException(); } return true; }).toCompletable(); } @Inject  CheckConnectionUseCase(WlanRepository wlanRepository); Single<Boolean> execute(); Completable executeCompletable();  }### Answer:
@Test public void executeCompletable_noConnectionThrowsException() { when(wlanRepository.isConnectedToWiFi()).thenReturn(Single.just(false)); useCase.executeCompletable() .test() .assertError(NetworkDisconnectedException.class); }