@Test
    public void writeAndReadMultipleValuesUsingClient() {
        final ConsulClient consulClient = new ConsulClient(
            consulContainer.getHost(),
            consulContainer.getFirstMappedPort()
        );

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

        // Write operation
        properties.forEach((key, value) -> {
            Response<Boolean> writeResponse = consulClient.setKVValue(key, value);
            assertThat(writeResponse.getValue()).isTrue();
        });

        // Read operation
        properties.forEach((key, value) -> {
            Response<GetValue> readResponse = consulClient.getKVValue(key);
            assertThat(readResponse.getValue().getDecodedValue()).isEqualTo(value);
        });
    }
This test shows the pattern to use the ConsulContainer @ClassRule for a junit test. It also has tests that ensure
the properties were added correctly by reading from Consul with the CLI and over HTTP.
modules/consul/src/test/java/org/testcontainers/consul/ConsulContainerTest.java