@@ -0,0 +1,3458 @@
+/*%0A   Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.%0A   SPDX-License-Identifier: Apache-2.0%0A*/%0A%0Aimport com.example.memorydb.*;%0Aimport software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider;%0Aimport org.junit.jupiter.api.*;%0Aimport software.amazon.awssdk.regions.Region;%0Aimport software.amazon.awssdk.services.memorydb.MemoryDbClient;%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 MemoryDBTest %7B%0A%0A    private static MemoryDbClient memoryDbClient;%0A    private static String clusterName=%22%22;%0A    private static String nodeType=%22%22;%0A    private static String subnetGroupName=%22%22;%0A    private static String aclName=%22%22;%0A    private static String snapShotName=%22%22;%0A%0A    @BeforeAll%0A    public static void setUp() throws IOException, URISyntaxException %7B%0A        Region region = Region.US_EAST_1;%0A        memoryDbClient = MemoryDbClient.builder()%0A            .region(region)%0A            .credentialsProvider(ProfileCredentialsProvider.create())%0A            .build();%0A%0A        try (InputStream input = MemoryDBTest.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            //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            clusterName = prop.getProperty(%22clusterName%22);%0A            nodeType = prop.getProperty(%22nodeType%22);%0A            subnetGroupName = prop.getProperty(%22subnetGroupName%22);%0A            aclName = prop.getProperty(%22aclName%22);%0A            snapShotName= prop.getProperty(%22snapShotName%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(memoryDbClient);%0A        System.out.println(%22Test 1 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(2)%0A    public void createCluster() %7B%0A        CreateCluster.createSingleCluster(memoryDbClient, clusterName, nodeType, subnetGroupName, aclName);%0A        System.out.println(%22Test 2 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(2)%0A    public void describeSpecificCluster() %7B%0A        DescribeSpecificCluster.checkIfAvailable(memoryDbClient, clusterName);%0A        System.out.println(%22Test 2 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(3)%0A    public void createSnapshot() %7B%0A        CreateSnapshot.createSpecificSnapshot(memoryDbClient, clusterName, snapShotName);%0A        System.out.println(%22Test 3 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(4)%0A    public void describeSnapshot() %7B%0A        DescribeSnapshots.describeALlSnapshots(memoryDbClient, clusterName);%0A        System.out.println(%22Test 4 passed%22);%0A    %7D%0A%0A    @Test%0A    @Order(5)%0A    public void describeAllClusters() %7B%0A        DescribeClusters.getClusters(memoryDbClient);%0A        DescribeSpecificCluster.checkIfAvailable(memoryDbClient, clusterName);%0A        System.out.println(%22Test 5 passed%22);%0A    %7D%0A%0A%0A    @Test%0A    @Order(7)%0A    public void deleteCluster() %7B%0A        DeleteCluster.deleteSpecificCluster(memoryDbClient, clusterName);%0A        System.out.println(%22Test 7 passed%22);%0A    %7D%0A%7D%0A%0A

Create MemoryDBTest.java