@Test
        public void sqsTestOverDockerNetwork() throws Exception {
            final String queueCreationResponse = runAwsCliAgainstDockerNetworkContainer(
                "sqs create-queue --queue-name baz"
            );

            assertThat(queueCreationResponse)
                .as("Created queue has external hostname URL")
                .contains("http://localstack:" + LocalStackContainer.PORT);

            runAwsCliAgainstDockerNetworkContainer(
                String.format(
                    "sqs send-message --endpoint http://localstack:%d --queue-url http://localstack:%d/queue/baz --message-body test",
                    LocalStackContainer.PORT,
                    LocalStackContainer.PORT
                )
            );
            final String message = runAwsCliAgainstDockerNetworkContainer(
                String.format(
                    "sqs receive-message --endpoint http://localstack:%d --queue-url http://localstack:%d/queue/baz",
                    LocalStackContainer.PORT,
                    LocalStackContainer.PORT
                )
            );

            assertThat(message).as("the sent message can be received").contains("\"Body\": \"test\"");
        }
Tests for Localstack Container, used both in bridge network (exposed to host) and docker network modes.
<p>
These tests attempt simple interactions with the container to verify behaviour. The bridge network tests use the
Java AWS SDK, whereas the docker network tests use an AWS CLI container within the network, to simulate usage of
Localstack from within a Docker network.
modules/localstack/src/test/java/org/testcontainers/containers/localstack/LocalstackContainerTest.java