InitParam initParam = portlet.addInitParam("testparam");
initParam.setParamValue("test value");
initParam.addDescription(lang).setDescription("This is a test portlet parameter");
Preferences prefs = portlet.getPortletPreferences();
Preference pref = prefs.addPreference("pref1");
pref.addValue("1");
registry.registerPortletApplication(app);
}