void () { Throwable error = LoggedErrorProcessor.executeAndReturnLoggedError( () -> { String expected = "Value42"; assertThrows(Exception.class, () -> retryWithExpBackOff.retry(() -> { throw new Exception(expected); }, logger), expected); }); assertNotNull(error); }