void () { assertNull(myRepository.createCancellableConnection().call()); myRepository.setPassword("illegal password"); final Exception error = myRepository.createCancellableConnection().call(); assertNotNull(error); assertTrue(error.getMessage().contains("Unauthorized")); }