@@ -0,0 +1,2641 @@
+/*%0A   Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.%0A   SPDX-License-Identifier: Apache-2.0%0A*/%0Aimport com.aws.rest.RetrieveItems;%0Aimport com.aws.rest.SendMessage;%0Aimport com.aws.rest.WorkItem;%0Aimport com.aws.rest.WriteExcel;%0Aimport org.junit.jupiter.api.BeforeAll;%0Aimport org.junit.jupiter.api.MethodOrderer;%0Aimport org.junit.jupiter.api.Order;%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.jupiter.api.TestInstance;%0Aimport org.junit.jupiter.api.TestMethodOrder;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.util.List;%0Aimport java.util.Properties;%0Aimport static org.junit.jupiter.api.Assertions.assertDoesNotThrow;%0Aimport static org.junit.jupiter.api.Assertions.assertNotNull;%0A%0A@TestInstance(TestInstance.Lifecycle.PER_METHOD)%0A@TestMethodOrder(MethodOrderer.OrderAnnotation.class)%0Apublic class RedshiftRestTest %7B%0A    private static String id=%22%22;%0A    private static String email=%22%22;%0A%0A    @BeforeAll%0A    public static void setUp() %7B%0A%0A        try (InputStream input = RedshiftRestTest.class.getClassLoader().getResourceAsStream(%22config.properties%22)) %7B%0A%0A            Properties prop = new Properties();%0A            if (input == null) %7B%0A                System.out.println(%22Sorry, unable to find config.properties%22);%0A                return;%0A            %7D%0A%0A            prop.load(input);%0A            id = prop.getProperty(%22id%22);%0A            email = prop.getProperty(%22email%22);%0A%0A        %7D catch (IOException ex) %7B%0A            ex.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @Test%0A    @Order(1)%0A    public void invokeArchive() %7B%0A        RetrieveItems ri = new RetrieveItems();%0A        List%3CWorkItem%3E myList = ri.getData(1);%0A        assertNotNull(myList);%0A        System.out.println(%22Test 2 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(2)%0A    public void invokeActive() %7B%0A        RetrieveItems ri = new RetrieveItems();%0A        List%3CWorkItem%3E myList = ri.getData(1);%0A        assertNotNull(myList);%0A        System.out.println(%22Test 3 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(3)%0A    public void flipItem()%7B%0A        RetrieveItems ri = new RetrieveItems();%0A        assertDoesNotThrow(() -%3E ri.flipItemArchive(id));%0A        System.out.println(%22Test 4 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(4)%0A    public void sendReport() %7B%0A        SendMessage sm = new SendMessage();%0A        RetrieveItems ri = new RetrieveItems();%0A        WriteExcel writeExcel = new WriteExcel();%0A        List%3CWorkItem%3E theList = ri.getData(0);%0A        assertNotNull(theList);%0A        java.io.InputStream is = writeExcel.exportExcel(theList);%0A        assertDoesNotThrow(() -%3E sm.sendReport(is, email));%0A        System.out.println(%22Test 5 passed%22);%0A    %7D%0A%7D%0A%0A

Create RedshiftRestTest.java