@Test
void setWithDuplicateKey() {

    assertThatThrownBy(() -> {
        properties.set("key1", "value1");
        properties.set("key1", "value2");
    }).isInstanceOf(Error.class)
      .hasMessageContaining("key=key1, previous=value1, current=value2");
}