@Test public void testAdd() { urlSetup("testQueue", "testUrl"); queueAddSetup(); sentRequest = ArgumentCaptor.forClass(SendMessageRequest.class); CompletableFuture<Void> noDelay = asyncClient.add("test", "testQueue"); verify(awsAsyncSqsClient).sendMessage(sentRequest.capture()); assertEquals(sentRequest.getValue().messageBody(), "test"); assertEquals(sentRequest.getValue().queueUrl(), "testUrl"); verify(awsAsyncSqsClient, times(1)).sendMessage(any(SendMessageRequest.class)); assertNull(noDelay.join()); }
@Override public CompletableFuture<Void> add( @NonNull final String message, @NonNull final String queueName) { return add(message, queueName, 0); }
AsyncSqsClientImpl implements AsyncSqsClient { @Override public CompletableFuture<Void> add( @NonNull final String message, @NonNull final String queueName) { return add(message, queueName, 0); } }
AsyncSqsClientImpl implements AsyncSqsClient { @Override public CompletableFuture<Void> add( @NonNull final String message, @NonNull final String queueName) { return add(message, queueName, 0); } @Inject  AsyncSqsClientImpl(
      @NonNull final SqsAsyncClient client,
      @NonNull final AsyncConveyorMetrics metrics,
      @NonNull final ExecutorService executor);   AsyncSqsClientImpl(
      @NonNull final SqsAsyncClient client,
      @NonNull final AsyncConveyorMetrics metrics,
      @NonNull final ExecutorService executor,
      long maxCacheSize,
      int receiveWaitTimeoutSeconds,
      int bulkheadMaxWaitMillis,
      int consumerConcurrency); }
AsyncSqsClientImpl implements AsyncSqsClient { @Override public CompletableFuture<Void> add( @NonNull final String message, @NonNull final String queueName) { return add(message, queueName, 0); } @Inject  AsyncSqsClientImpl(
      @NonNull final SqsAsyncClient client,
      @NonNull final AsyncConveyorMetrics metrics,
      @NonNull final ExecutorService executor);   AsyncSqsClientImpl(
      @NonNull final SqsAsyncClient client,
      @NonNull final AsyncConveyorMetrics metrics,
      @NonNull final ExecutorService executor,
      long maxCacheSize,
      int receiveWaitTimeoutSeconds,
      int bulkheadMaxWaitMillis,
      int consumerConcurrency); @Override CompletableFuture<Void> add(
      @NonNull final String message, @NonNull final String queueName); @Override CompletableFuture<Void> add(
      @NonNull final String message, @NonNull final String queueName, int delaySeconds); @Override CompletableFuture<Boolean> consume(
      @NonNull final Consumer<String> consumer, @NonNull final String queueName); @Override CompletableFuture<Boolean> consume(AsyncConsumer<String> consumer, String queueName); @Override void close(); }
AsyncSqsClientImpl implements AsyncSqsClient { @Override public CompletableFuture<Void> add( @NonNull final String message, @NonNull final String queueName) { return add(message, queueName, 0); } @Inject  AsyncSqsClientImpl(
      @NonNull final SqsAsyncClient client,
      @NonNull final AsyncConveyorMetrics metrics,
      @NonNull final ExecutorService executor);   AsyncSqsClientImpl(
      @NonNull final SqsAsyncClient client,
      @NonNull final AsyncConveyorMetrics metrics,
      @NonNull final ExecutorService executor,
      long maxCacheSize,
      int receiveWaitTimeoutSeconds,
      int bulkheadMaxWaitMillis,
      int consumerConcurrency); @Override CompletableFuture<Void> add(
      @NonNull final String message, @NonNull final String queueName); @Override CompletableFuture<Void> add(
      @NonNull final String message, @NonNull final String queueName, int delaySeconds); @Override CompletableFuture<Boolean> consume(
      @NonNull final Consumer<String> consumer, @NonNull final String queueName); @Override CompletableFuture<Boolean> consume(AsyncConsumer<String> consumer, String queueName); @Override void close();  }