title: Test GCP publisher retry settings in Spring application
body: <p>I've a spring integration application - which listens for messages from a Kafka topic and publishes them to Google Cloud Topic.</p>
  
  <p>The GCP Publisher is created using DefaultPublisherFactory and has the below retry configuration</p>
  
  <pre><code>RetrySettings retrySettings = RetrySettings.newBuilder()
          .setInitialRetryDelay(Duration.ofSeconds(1))
          .setRetryDelayMultiplier(600)
          .setMaxRetryDelay(Duration.ofSeconds(2))
          .setTotalTimeout(Duration.ofSeconds(10))
          .setInitialRpcTimeout(Duration.ofSeconds(10))
          .setMaxRpcTimeout(Duration.ofSeconds(10))
          .build()
  </code></pre>
  
  <p>The application is up and everything runs as expected. </p>
  
  <p>But I'm unable to figure out how to test the above retry settings. </p>
  
  <p>Since the application isn't failing - the retry scenario is not tested. </p>
  
  <p>I'm fairly new to integration testing - I googled a lot - but could not figure out way - to produce or mock the retry scenario.</p>
  
  <p>Any guidance in figuring this out would be very helpful.</p>
  
  <p>Thanks.</p>