[TEST] fixed mocking logic to include id
Original commit: elastic/x-pack-elasticsearch@7b20e92fdc68da2d38f4083849c2a41c7728aa5f
@@ -20,6 +20,7 @@ import org.mockito.Mockito;
import java.io.IOException;
+import static org.mockito.Matchers.any;
import static org.mockito.Mockito.when;
public class AuditorTests extends ESTestCase {
@@ -92,9 +93,9 @@ public class AuditorTests extends ESTestCase {
IndexRequestBuilder indexRequestBuilder = Mockito.mock(IndexRequestBuilder.class);
when(indexRequestBuilder.setSource(jsonCaptor.capture())).thenReturn(indexRequestBuilder);
when(indexRequestBuilder.execute()).thenReturn(indexResponse);
- when(client.prepareIndex(indexCaptor.capture(), typeCaptor.capture()))
+ when(client.prepareIndex(indexCaptor.capture(), typeCaptor.capture(), any()))
.thenReturn(indexRequestBuilder);
- when(client.prepareIndex(indexCaptor.capture(), typeCaptor.capture()))
+ when(client.prepareIndex(indexCaptor.capture(), typeCaptor.capture(), any()))
.thenReturn(indexRequestBuilder);
}
