title: How to mock DynamoDB batch save?
body: <p>I wrote the dynamoDB code which stores list of items.</p>
  
  <pre><code>mapper.batchSave(trafficSensorReadings)
  </code></pre>
  
  <p>This will return.</p>
  
  <pre><code>List&lt;FailedBatch&gt;
  </code></pre>
  
  <p>I want to mock the mapper.batchSave and then return one failed job. How can I achieve it? I am using mockito and Junit.</p>
  
  <p>I wrote something like this. But not useful.</p>
  
  <pre><code>        when(dynamoDBMapper.batchSave(eq(List.class))).thenReturn(mock(List.class));
  </code></pre>