And of course we need to fix the setProperties method to throw an exception:

 public MapStoreConfig setProperties(Properties properties) {
        ValidationUtil.isNotNull(properties,"properties");
        this.properties = properties;
        return this;
    }