@Override
  public void write(String propertyKey, @Nullable String value) {
    checkPropertyKey(propertyKey);

    try (DbSession dbSession = dbClient.openSession(false)) {
      if (value == null || value.isEmpty()) {
        dbClient.internalPropertiesDao().saveAsEmpty(dbSession, propertyKey);
      } else {
        dbClient.internalPropertiesDao().save(dbSession, propertyKey, value);
      }
      dbSession.commit();
    }
  }
@Test
  public void write_throws_IAE_if_key_is_null() {
    expectKeyNullOrEmptyIAE(() -> underTest.write(null, SOME_VALUE));
  }