@Test public void streamIOExceptionTest() throws IOException, InterruptedException, ExecutionException { Mockito.doThrow(IOException.class).when(stream).flush(); Future<Boolean> initializeTask = this.messageWriter.writeInitializeMessage(InitializationInput.builder().shardId(shardId).build()); Boolean result = initializeTask.get(); Assert.assertNotNull(result); Assert.assertFalse(result); }
Future<Boolean> writeInitializeMessage(InitializationInput initializationInput) { return writeMessage(new InitializeMessage(initializationInput)); }
MessageWriter { Future<Boolean> writeInitializeMessage(InitializationInput initializationInput) { return writeMessage(new InitializeMessage(initializationInput)); } }
MessageWriter { Future<Boolean> writeInitializeMessage(InitializationInput initializationInput) { return writeMessage(new InitializeMessage(initializationInput)); } MessageWriter(); }
MessageWriter { Future<Boolean> writeInitializeMessage(InitializationInput initializationInput) { return writeMessage(new InitializeMessage(initializationInput)); } MessageWriter();  }
MessageWriter { Future<Boolean> writeInitializeMessage(InitializationInput initializationInput) { return writeMessage(new InitializeMessage(initializationInput)); } MessageWriter();   }