@Test(dataProvider = "itemsDataProvider") public void testAddItems(T[] items) { Collection<T> itemsToAdd = Arrays.asList(items); SQSQueueResult sqsQueueResult = new SQSQueueResult().setSuccessful(true); doReturn(sqsQueueResult).when(mockAddRequestProcessor).processRequest(any()); QueueResult<T> queueResult = sqsItemQueue.add(itemsToAdd); Assert.assertNotNull(queueResult); Assert.assertTrue(queueResult.isSuccessful()); }
@Override public QueueResult<T> add(T item) { return add(Collections.singletonList(item)); }
SQSItemQueue implements ItemQueue<T> { @Override public QueueResult<T> add(T item) { return add(Collections.singletonList(item)); } }
SQSItemQueue implements ItemQueue<T> { @Override public QueueResult<T> add(T item) { return add(Collections.singletonList(item)); } SQSItemQueue(AmazonSQS amazonSQS, String queueURL, Class clazz); }
SQSItemQueue implements ItemQueue<T> { @Override public QueueResult<T> add(T item) { return add(Collections.singletonList(item)); } SQSItemQueue(AmazonSQS amazonSQS, String queueURL, Class clazz); @Override QueueResult<T> add(T item); @Override QueueResult<T> add(Collection<T> items); @Override QueueResult<T> peek(); @Override QueueResult<T> poll(); @Override QueueResult<T> poll(int maxPollCount); @Override QueueResult<T> size(); ObjectMapper getObjectMapper(); void setObjectMapper(ObjectMapper objectMapper); AddRequestProcessor getAddRequestProcessor(); void setAddRequestProcessor(AddRequestProcessor addRequestProcessor); PollRequestProcessor getPollRequestProcessor(); void setPollRequestProcessor(PollRequestProcessor pollRequestProcessor); SizeRequestProcessor getSizeRequestProcessor(); void setSizeRequestProcessor(SizeRequestProcessor sizeRequestProcessor); }
SQSItemQueue implements ItemQueue<T> { @Override public QueueResult<T> add(T item) { return add(Collections.singletonList(item)); } SQSItemQueue(AmazonSQS amazonSQS, String queueURL, Class clazz); @Override QueueResult<T> add(T item); @Override QueueResult<T> add(Collection<T> items); @Override QueueResult<T> peek(); @Override QueueResult<T> poll(); @Override QueueResult<T> poll(int maxPollCount); @Override QueueResult<T> size(); ObjectMapper getObjectMapper(); void setObjectMapper(ObjectMapper objectMapper); AddRequestProcessor getAddRequestProcessor(); void setAddRequestProcessor(AddRequestProcessor addRequestProcessor); PollRequestProcessor getPollRequestProcessor(); void setPollRequestProcessor(PollRequestProcessor pollRequestProcessor); SizeRequestProcessor getSizeRequestProcessor(); void setSizeRequestProcessor(SizeRequestProcessor sizeRequestProcessor);  }