private static byte[] createLambdaHandlerZipFile() throws IOException {
            StringBuilder sb = new StringBuilder();
            sb.append("def handler(event, context):\n");
            sb.append("    return event");

            ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
            ZipOutputStream out = new ZipOutputStream(byteOutput);
            ZipEntry e = new ZipEntry("handler.py");
            out.putNextEntry(e);

            byte[] data = sb.toString().getBytes();
            out.write(data, 0, data.length);
            out.closeEntry();
            out.close();
            return byteOutput.toByteArray();
        }
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