title: Unable to Mock DynamoDB Mapper on jenkins using Mockito
body: <p>I tried mocking DynamoDBMapper from amazon aws(com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper) using mockito. This works fine on my local machine but I get the following error when I run it on jenkins</p>
  
  <p>"Mockito cannot mock this class: class com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper"</p>
  
  <p>Following is the Java and OS versions I have on jenkins</p>
  
  <ol>
  <li>Java               : 1.8 </li>
  <li>JVM vendor name    : Oracle Corporation JVM</li>
  <li>vendor version : 25.5-b02 </li>
  <li>JVM name           : Java HotSpot(TM)64-Bit Server VM </li>
  <li>JVM version        : 1.8.0_05-b13 </li>
  <li>JVM info           : mixed mode </li>
  <li>OS name            : Linux </li>
  <li>OS version         : 4.9.85-37.55.amzn1.x86_64</li>
  </ol>
  
  <p>Following is the code I am using to mock Dynamodb mapper</p>
  
  <pre><code>@Mock
  private DynamoDBMapper dynamoDBMapper;
  
  @BeforeMethod
  public void setUp() {
      initMocks(this);
      repository = new DynamoDBReservationStateRepositoryImpl();
      repository.setDynamoDBMapper(dynamoDBMapper);
  }
  </code></pre>
  
  <p>Can someone please help me understand why I have different behavior on my local machine and jenkins and how I can fix this issue without adding any additional wrapper around DynamoDBMapper</p>