@@ -0,0 +1,3323 @@
+import com.example.comprehend.*;%0Aimport org.junit.jupiter.api.*;%0Aimport static org.junit.jupiter.api.Assertions.assertNotNull;%0Aimport software.amazon.awssdk.regions.Region;%0Aimport software.amazon.awssdk.services.comprehend.ComprehendClient;%0Aimport java.io.*;%0Aimport java.util.*;%0A%0A@TestInstance(TestInstance.Lifecycle.PER_METHOD)%0A@TestMethodOrder(MethodOrderer.OrderAnnotation.class)%0Apublic class AmazonComprehendServiceIntegrationTest %7B%0A%0A    private static  ComprehendClient comClient;%0A    private static String text = %22Amazon.com, Inc. is located in Seattle, WA and was founded July 5th, 1994 by Jeff Bezos, allowing customers to buy everything from books to blenders. Seattle is north of Portland and south of Vancouver, BC. Other notable Seattle - based companies are Starbucks and Boeing%22 ;%0A    private static String frText = %22Il pleut aujourd'hui %C3%A0 Seattle%22 ;%0A    private static String dataAccessRoleArn;%0A    private static String s3Uri;%0A    private static String documentClassifierName;%0A%0A    @BeforeAll%0A    public static void setUp() throws IOException %7B%0A%0A        // Run tests on Real AWS Resources%0A        Region region = Region.US_EAST_1;%0A        comClient = ComprehendClient.builder()%0A                .region(region)%0A                .build();%0A%0A        try (InputStream input = AmazonComprehendServiceIntegrationTest.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             dataAccessRoleArn = prop.getProperty(%22dataAccessRoleArn%22);%0A            s3Uri = prop.getProperty(%22s3Uri%22);%0A            documentClassifierName = prop.getProperty(%22documentClassifier%22);%0A%0A        %7D catch (IOException ex) %7B%0A            ex.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @Test%0A    @Order(1)%0A    public void whenInitializingAWSPinpointService_thenNotNull() %7B%0A        assertNotNull(comClient);%0A        System.out.println(%22Test 1 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(2)%0A    public void DetectEntities() %7B%0A%0A        DetectEntities.detectAllEntities(comClient, text);%0A        System.out.println(%22Test 2 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(3)%0A    public void DetectKeyPhrases() %7B%0A%0A        DetectKeyPhrases.detectAllKeyPhrases(comClient, text);%0A        System.out.println(%22Test 3 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(4)%0A    public void DetectLanguage() %7B%0A%0A        DetectLanguage.detectTheDominantLanguage(comClient, frText);%0A        System.out.println(%22Test 4 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(5)%0A    public void DetectSentiment() %7B%0A%0A        DetectSentiment.detectSentiments(comClient, text);%0A        System.out.println(%22Test 5 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(6)%0A    public void DetectSyntax() %7B%0A%0A        DetectSyntax.detectAllSyntax(comClient, text);%0A        System.out.println(%22Test 6 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(7)%0A    public void DocumentClassifierDemo() %7B%0A%0A      DocumentClassifierDemo.createDocumentClassifier(comClient, dataAccessRoleArn, s3Uri, documentClassifierName);%0A     System.out.println(%22Test 7 passed%22);%0A    %7D%0A%7D%0A

Create AmazonComprehendServiceIntegrationTest.java