### Question:
MultiLangProtocol { boolean shutdownRequested(RecordProcessorCheckpointer checkpointer) { Future<Boolean> writeFuture = messageWriter.writeShutdownRequestedMessage(); return waitForStatusMessage(ShutdownRequestedMessage.ACTION, checkpointer, writeFuture); } MultiLangProtocol(MessageReader messageReader, MessageWriter messageWriter,
            InitializationInput initializationInput, MultiLangDaemonConfiguration configuration);   }### Answer:
@Test public void shutdownRequestedTest() { when(messageWriter.writeShutdownRequestedMessage()).thenReturn(buildFuture(true)); when(messageReader.getNextMessageFromSTDOUT()).thenReturn(buildFuture( new StatusMessage("shutdownRequested"), Message.class)); Mockito.doReturn(buildFuture(true)).when(messageWriter) .writeShutdownRequestedMessage(); Mockito.doReturn(buildFuture(new StatusMessage("shutdownRequested"))) .when(messageReader).getNextMessageFromSTDOUT(); assertThat(protocol.shutdownRequested(null), equalTo(true)); }