public Object set(final String property, final Object value) {
    Objects.requireNonNull(value, "value");
    final Object parsed = parser.parse(property, value);
    return props.put(property, parsed);
  }
@Test(expected = IllegalArgumentException.class)
  public void shouldThrowIfParserThrows() {
    // Given:
    when(parser.parse("prop-1", "new-val"))
        .thenThrow(new IllegalArgumentException("Boom"));

    // When:
    propsWithMockParser.set("prop-1", "new-val");
  }