public T setEnvVariable(String key, String value) {
    envVariables.put(
      requireNonNull(key, "key can't be null"),
      requireNonNull(value, "value can't be null"));
    return castThis();
  }
@Test
  public void setEnvVariable_fails_with_NPE_if_value_is_null() throws IOException {
    File workDir = temp.newFolder();
    AbstractCommand underTest = new AbstractCommand(ProcessId.ELASTICSEARCH, workDir, System2.INSTANCE) {

    };

    assertThatThrownBy(() -> underTest.setEnvVariable(randomAlphanumeric(30), null))
      .isInstanceOf(NullPointerException.class)
      .hasMessage("value can't be null");
  }