@Test
    public void readSecondSecretPathWithCli() throws Exception {
        GenericContainer.ExecResult result = vaultContainer.execInContainer(
            "vault",
            "kv",
            "get",
            "-format=json",
            "secret/testing2"
        );

        final String output = result.getStdout().replaceAll("\\r?\\n", "");
        System.out.println("output = " + output);
        assertThat(output).contains("password1");
        assertThat(output).contains("password2");
        assertThat(output).contains("password3");
        assertThat(output).contains("password4");
    }
This test shows the pattern to use the VaultContainer @ClassRule for a junit test. It also has tests that ensure
the secrets were added correctly by reading from Vault with the CLI, over HTTP and over Client Library.
modules/vault/src/test/java/org/testcontainers/vault/VaultContainerTest.java