@@ -0,0 +1,2826 @@
+import com.example.workdocs.DownloadUserDoc;%0Aimport com.example.workdocs.ListUserDocs;%0Aimport com.example.workdocs.ListUsers;%0Aimport org.junit.jupiter.api.*;%0Aimport com.example.workdocs.*;%0Aimport static org.junit.jupiter.api.Assertions.assertNotNull;%0Aimport software.amazon.awssdk.services.workdocs.WorkDocsClient;%0Aimport java.io.*;%0Aimport java.util.Properties;%0Aimport  software.amazon.awssdk.regions.Region;%0A%0A@TestInstance(TestInstance.Lifecycle.PER_METHOD)%0A@TestMethodOrder(MethodOrderer.OrderAnnotation.class)%0Apublic class WorkdocsServiceIntegrationTest %7B%0A%0A    private static WorkDocsClient workDocs;%0A    private static String orgId = %22%22 ;%0A    private static String userEmail =  %22%22 ;;%0A    private static String workdocsName =  %22%22;%0A    private static String saveDocFullName = %22%22;%0A    private static String docName= %22%22;%0A    private static String docPath= %22%22;%0A%0A    @BeforeAll%0A    public static void setUp() throws IOException %7B%0A%0A        Region region = Region.US_WEST_2;%0A        workDocs = WorkDocsClient.builder()%0A                .region(region)%0A                .build();%0A%0A%0A        try (InputStream input = WorkdocsServiceIntegrationTest.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            orgId = prop.getProperty(%22orgId%22);%0A            userEmail = prop.getProperty(%22userEmail%22);%0A            workdocsName = prop.getProperty(%22workdocsName%22);%0A            saveDocFullName = prop.getProperty(%22saveDocFullName%22);%0A            docName = prop.getProperty(%22docName%22);%0A            docPath = prop.getProperty(%22docPath%22);%0A%0A        %7D catch (IOException ex) %7B%0A            ex.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @Test%0A    @Order(1)%0A    public void whenInitializingAWSWorkdocsService_thenNotNull() %7B%0A        assertNotNull(workDocs);%0A        System.out.println(%22Test 1 passed%22);%0A    %7D%0A%0A%0A    @Test%0A    @Order(2)%0A    public void UploadUserDoc() %7B%0A%0A        UploadUserDocs.uploadDoc(workDocs, orgId, userEmail, docName, docPath);%0A        System.out.println(%22Test 2 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(3)%0A    public void DownloadUserDoc() %7B%0A%0A        DownloadUserDoc.downloadDoc(workDocs, orgId, userEmail, workdocsName, saveDocFullName);%0A        System.out.println(%22Test 3 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(4)%0A    public void ListUserDocs() %7B%0A%0A    ListUserDocs.listDocs(workDocs, orgId, userEmail);%0A    System.out.println(%22Test 4 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(5)%0A    public void ListUsers() %7B%0A        ListUsers.getAllUsers(workDocs, orgId);%0A        System.out.println(%22Test 5 passed%22);%0A    %7D%0A %7D%0A%0A

Create WorkdocsServiceIntegrationTest.java