When using expect4j, thread interrupts are being lost. The expect4j Consumers are handling the InterruptedException in waitForBuffer but the exception is only logged so the Thread interrupt status is cleared and the calling thread is not aware that it should stop after returning from the expect4j call.
Can the Consumers be updated to either rethrow the Interrupted Exception or set the interrupt status again?