@@ -0,0 +1,3289 @@
+import com.example.cloudtrail.*;%0Aimport software.amazon.awssdk.services.cloudtrail.CloudTrailClient;%0Aimport org.junit.jupiter.api.*;%0Aimport software.amazon.awssdk.regions.Region;%0Aimport java.io.*;%0Aimport java.net.URISyntaxException;%0Aimport java.util.*;%0Aimport static org.junit.jupiter.api.Assertions.*;%0A%0A@TestInstance(TestInstance.Lifecycle.PER_METHOD)%0A@TestMethodOrder(MethodOrderer.OrderAnnotation.class)%0Apublic class CloudTrailTest %7B%0A%0Aprivate static CloudTrailClient cloudTrailClient ;%0Aprivate static String trailName = %22%22;%0A    private static String s3BucketName = %22%22;%0A%0A    @BeforeAll%0A    public static void setUp() throws IOException, URISyntaxException %7B%0A%0A        Region region = Region.US_EAST_1;%0A        cloudTrailClient = CloudTrailClient.builder()%0A                .region(region)%0A                .build();%0A%0A        try (InputStream input = CloudTrailTest.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            trailName = prop.getProperty(%22trailName%22);%0A            s3BucketName = prop.getProperty(%22s3BucketName%22);%0A%0A        %7D catch (IOException ex) %7B%0A            ex.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @Test%0A    @Order(1)%0A    public void whenInitializingAWSService_thenNotNull() %7B%0A        assertNotNull(cloudTrailClient);%0A        System.out.println(%22Test 1 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(2)%0A    public void CreateTrail() %7B%0A        CreateTrail.createNewTrail(cloudTrailClient, trailName, s3BucketName);%0A        System.out.println(%22Test 2 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(3)%0A    public void PutEventSelectors() %7B%0A        PutEventSelectors.setSelector(cloudTrailClient, trailName);%0A        System.out.println(%22Test 3 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(4)%0A    public void GetEventSelectors() %7B%0A        GetEventSelectors.getSelectors(cloudTrailClient, trailName);%0A        System.out.println(%22Test 4 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(5)%0A    public void LookupEvents() %7B%0A        LookupEvents.lookupAllEvents(cloudTrailClient);%0A        System.out.println(%22Test 5 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(6)%0A    public void DescribeTrails() %7B%0A        DescribeTrails.describeSpecificTrails(cloudTrailClient, trailName);%0A        System.out.println(%22Test 6 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(7)%0A    public void GetTrailLoggingTime() %7B%0A        GetTrailLoggingTime.getLogTime(cloudTrailClient, trailName);%0A        System.out.println(%22Test 7 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(8)%0A    public void StartLogging() %7B%0A%0A        StartLogging.startLog(cloudTrailClient, trailName);%0A        System.out.println(%22Test 8 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(9)%0A    public void StopLogging() %7B%0A%0A        StartLogging.stopLog(cloudTrailClient, trailName);%0A        System.out.println(%22Test 9 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(10)%0A    public void DeleteTrail() %7B%0A        DeleteTrail.deleteSpecificTrail(cloudTrailClient, trailName);%0A        System.out.println(%22Test 10 passed%22);%0A    %7D%0A%7D%0A

Create CloudTrailTest.java