### Question:
SQSItemQueue implements ItemQueue<T> { @Override public QueueResult<T> poll() { return poll(1); } 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);  }### Answer:
@Test public void testPollError() { SQSQueueResult sqsQueueResult = new SQSQueueResult().setSuccessful(false); doReturn(sqsQueueResult).when(mockPollRequestProcessor).processRequest(any()); QueueResult<T> queueResult = sqsItemQueue.poll(); Assert.assertNotNull(queueResult); Assert.assertFalse(queueResult.isSuccessful()); }