@Test
    public void writeSecretOverClientLibrary() throws Exception {
        final VaultConfig config = new VaultConfig()
            .address(vaultContainer.getHttpHostAddress())
            .token(VAULT_TOKEN)
            .build();

        final Vault vault = new Vault(config);

        final Map<String, Object> secrets = new HashMap<>();
        secrets.put("value", "world");
        secrets.put("other_value", "another world");

        // Write operation
        final LogicalResponse writeResponse = vault.logical().write("secret/hello", secrets);

        assertThat(writeResponse.getRestResponse().getStatus()).isEqualTo(200);

        // Read operation
        final Map<String, String> value = vault.logical().read("secret/hello").getData();

        assertThat(value).containsEntry("value", "world").containsEntry("other_value", "another world");
    }
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