@Test
public void getEnv() {

    CreateAgentParameters params = CreateAgentParameters.from(Node.EMPTY_OBJECT);
    assertThat(params.getEnv()).isEmpty();
    params.env("key1", "value1").env("key2", "value2");
    assertThat(params.getEnv()).isEqualTo(mapOf(pair("key1", "value1"), pair("key2", "value2")));
    assertThatExceptionOfType(NullPointerException.class).isThrownBy(() -> params.env("foo", null));
    assertThatExceptionOfType(NullPointerException.class).isThrownBy(() -> params.env(null, "bar"));
}