@Test public void whenKafkaProducerFailTransportCommandReturnFalse() throws InterruptedException, ExecutionException { when(kermossProperties.getKafkaDestination(anyString())).thenReturn("io.kermoss.topic.pizza-shop"); ListenableFuture mock = mock(ListenableFuture.class); TransporterCommand command =mock(TransporterCommand.class); ListenableFuture<SendResult<String, TransporterCommand>> send = this.kafkaTemplate.send("io.kermoss.topic.pizza-shop", command); when(send).thenThrow(InterruptedException.class); Boolean transportCommand = kafkaCommandTransporterStrategy.transportCommand(command); Assert.assertFalse(transportCommand); }
@Override public Boolean transportCommand(TransporterCommand command) { return postCommand(command); }
KafkaCommandTransporterStrategy implements CommandTransporterStrategy { @Override public Boolean transportCommand(TransporterCommand command) { return postCommand(command); } }
KafkaCommandTransporterStrategy implements CommandTransporterStrategy { @Override public Boolean transportCommand(TransporterCommand command) { return postCommand(command); } KafkaCommandTransporterStrategy(KafkaTemplate<String, TransporterCommand> kafkaTemplate,
			KermossProperties kermossProperties); }
KafkaCommandTransporterStrategy implements CommandTransporterStrategy { @Override public Boolean transportCommand(TransporterCommand command) { return postCommand(command); } KafkaCommandTransporterStrategy(KafkaTemplate<String, TransporterCommand> kafkaTemplate,
			KermossProperties kermossProperties); @Override Boolean transportPrepareCommand(final TransporterCommand command); @Override Boolean transportCommand(TransporterCommand command); }
KafkaCommandTransporterStrategy implements CommandTransporterStrategy { @Override public Boolean transportCommand(TransporterCommand command) { return postCommand(command); } KafkaCommandTransporterStrategy(KafkaTemplate<String, TransporterCommand> kafkaTemplate,
			KermossProperties kermossProperties); @Override Boolean transportPrepareCommand(final TransporterCommand command); @Override Boolean transportCommand(TransporterCommand command);  }