@@ -0,0 +1,1304 @@
+package io.searchbox.indices.reindex;%0A%0Aimport io.searchbox.client.JestResult;%0Aimport io.searchbox.common.AbstractIntegrationTest;%0A%0Aimport java.io.IOException;%0A%0Aimport org.elasticsearch.test.ESIntegTestCase;%0Aimport org.junit.Test;%0A%0Aimport com.google.common.collect.ImmutableMap;%0A%0A/**%0A * @author fabien baligand%0A */%0A@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 1)%0Apublic class ReindexIntegrationTest extends AbstractIntegrationTest %7B%0A%0A    @Test%0A    public void testReindex() throws IOException %7B%0A        String sourceIndex = %22my_source_index%22;%0A        String destIndex = %22my_dest_index%22;%0A        String documentType = %22my_type%22;%0A%09%09String documentId = %22my_id%22;%0A        %0A        createIndex(sourceIndex);%0A%09%09index(sourceIndex, documentType, documentId, %22%7B%7D%22);%0A%0A    %09ImmutableMap%3CString, Object%3E source = ImmutableMap.%3CString, Object%3Eof(%22index%22, sourceIndex);%0A    %09ImmutableMap%3CString, Object%3E dest = ImmutableMap.%3CString, Object%3Eof(%22index%22, destIndex);%0A    %09Reindex reindex = new Reindex.Builder(source, dest).build();%0A    %09JestResult result = client.execute(reindex);%0A        %0A        assertTrue(result.getErrorMessage(), result.isSucceeded());%0A        assertTrue(indexExists(destIndex));%0A        assertTrue(get(destIndex, documentType, documentId).isExists());%0A    %7D%0A%0A%7D%0A

add reindex API integration test