public void setCliProperty(final String name, final Object value) {
    try {
      config = config.with(name, value);
    } catch (final ConfigException e) {
      terminal.writer().println(e.getMessage());
    }
  }
@Test
  public void shouldThrowOnInvalidCliProperty() {
    // When:
    console.setCliProperty("FOO", "BAR");

    // Then:
    assertThat(terminal.getOutputString(),
        containsString("Undefined property: FOO. Valid properties are"));
  }