@@ -0,0 +1,2824 @@
+import com.example.textract.AnalyzeDocument;%0Aimport com.example.textract.DetectDocumentText;%0Aimport com.example.textract.DetectDocumentTextS3;%0Aimport com.example.textract.StartDocumentAnalysis;%0Aimport org.junit.jupiter.api.*;%0Aimport static org.junit.jupiter.api.Assertions.assertNotNull;%0Aimport static org.junit.jupiter.api.Assertions.assertTrue;%0Aimport software.amazon.awssdk.regions.Region;%0Aimport software.amazon.awssdk.services.textract.TextractClient;%0Aimport java.io.*;%0Aimport java.util.*;%0A%0A@TestInstance(TestInstance.Lifecycle.PER_METHOD)%0A@TestMethodOrder(MethodOrderer.OrderAnnotation.class)%0Apublic class AmazonTextractServiceIntegrationTest %7B%0A%0A    private static TextractClient textractClient;%0A    private static Region region;%0A    private static String sourceDoc = %22%22;%0A    private static String bucketName = %22%22;%0A    private static String docName = %22%22;%0A%0A    @BeforeAll%0A    public static void setUp() throws IOException %7B%0A%0A        // Run tests on Real AWS Resources%0A        region = Region.US_WEST_2;%0A        textractClient = TextractClient.builder()%0A                .region(region)%0A                .build();%0A%0A        try (InputStream input = AmazonTextractServiceIntegrationTest.class.getClassLoader().getResourceAsStream(%22config.properties%22)) %7B%0A%0A            Properties prop = new Properties();%0A%0A            if (input == null) %7B%0A                System.out.println(%22Sorry, unable to find config.properties%22);%0A                return;%0A            %7D%0A%0A            //load a properties file from class path, inside static method%0A            prop.load(input);%0A%0A            // Populate the data members required for all tests%0A            sourceDoc = prop.getProperty(%22sourceDoc%22);%0A            bucketName = prop.getProperty(%22bucketName%22);%0A            docName = prop.getProperty(%22docName%22);%0A%0A%0A        %7D catch (IOException ex) %7B%0A            ex.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @Test%0A    @Order(1)%0A    public void whenInitializingTextractService_thenNotNull() %7B%0A        assertNotNull(textractClient);%0A        System.out.println(%22Test 1 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(2)%0A    public void AnalyzeDocument() %7B%0A%0A        AnalyzeDocument.analyzeDoc(textractClient, sourceDoc);%0A        System.out.println(%22Test 2 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(3)%0A    public void DetectDocumentText() %7B%0A%0A        DetectDocumentText.detectDocText(textractClient, sourceDoc);%0A        System.out.println(%22Test 3 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(4)%0A    public void DetectDocumentTextS3() %7B%0A%0A        DetectDocumentTextS3.detectDocTextS3(textractClient, bucketName, docName);%0A        System.out.println(%22Test 4 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(5)%0A    public void StartDocumentAnalysis() %7B%0A%0A        StartDocumentAnalysis.startDocAnalysisS3(textractClient, bucketName, docName);%0A        System.out.println(%22Test 5 passed%22);%0A    %7D%0A%7D%0A

Create AmazonTextractServiceIntegrationTest.java