Description d4 = descs.get(1);
assertEquals(d4.getLang(), "fr");
assertEquals(d4.getDescription(), "Mon Filtre 1");
List<DisplayName> dnames = filter.getDisplayNames();
assertEquals(dnames.size(), 2);
DisplayName dn3 = dnames.get(0);
assertEquals(dn3.getLang(), "en");
assertEquals(dn3.getDisplayName(), "This is my filter 1");
DisplayName dn4 = dnames.get(1);
assertEquals(dn4.getLang(), "fr");
assertEquals(dn4.getDisplayName(), "Ceci est mon filtre 1");
List<InitParam> iparams = filter.getInitParams();
assertEquals(iparams.size(), 2);
InitParam ip3 = iparams.get(0);
assertEquals(ip3.getParamName(),"filter init param 1");
assertEquals(ip3.getParamValue(), "value for filter init param 1");
InitParam ip4 = iparams.get(1);
assertEquals(ip4.getParamName(), "filter init param 2");
assertEquals(ip4.getParamValue(), "value for filter init param 2");
List<String> lcycles = filter.getLifecycles();
assertEquals(lcycles.size(), 3);
assertEquals(lcycles.get(0), "lifecycle-1");
assertEquals(lcycles.get(1), "lifecycle-2");
assertEquals(lcycles.get(2), "lifecycle-3");
List<Listener> listeners = app.getListeners();
assertEquals(listeners.size(), 2);
Listener listener1 = listeners.get(0);
assertEquals(listener1.getListenerClass(), "org.apache.listener.ListenerOne");
descs = listener1.getDescriptions();
assertEquals(descs.size(), 2);
Description d5 = descs.get(0);
assertEquals(d5.getLang(), "en");
assertEquals(d5.getDescription(), "Listen to me once");
Description d6 = descs.get(1);
assertEquals(d6.getLang(), "fr");
assertEquals(d6.getDescription(), "�coutez moi une fois");
dnames = listener1.getDisplayNames();
assertEquals(dnames.size(), 2);
DisplayName dn5 = dnames.get(0);
assertEquals(dn5.getLang(), "en");
assertEquals(dn5.getDisplayName(), "Listen to me twice");
DisplayName dn6 = dnames.get(1);
assertEquals(dn6.getLang(), "fr");
assertEquals(dn6.getDisplayName(), "�coutez moi deux fois");
Listener listener2 = listeners.get(1);
assertEquals(listener2.getListenerClass(), "org.apache.listener.ListenerTwo");
descs = listener2.getDescriptions();
assertEquals(descs.size(), 2);
d5 = descs.get(0);
assertEquals(d5.getLang(), "en");
assertEquals(d5.getDescription(), "Don't listen to me");
d6 = descs.get(1);
assertEquals(d6.getLang(), "fr");
assertEquals(d6.getDescription(), "N'�coutez pas moi");
dnames = listener2.getDisplayNames();
assertEquals(dnames.size(), 2);
dn5 = dnames.get(0);
assertEquals(dn5.getLang(), "en");
assertEquals(dn5.getDisplayName(), "Listen!");
dn6 = dnames.get(1);
assertEquals(dn6.getLang(), "fr");
assertEquals(dn6.getDisplayName(), "�coutez!");
List<SecurityConstraint> scs = app.getSecurityConstraints();
assertEquals(scs.size(), 2);
SecurityConstraint sc1 = scs.get(0);
assertEquals(sc1.getUserDataConstraint().getTransportGuarantee(), UserDataConstraint.INTEGRAL);
DisplayName scdn1 = sc1.getDisplayName(new Locale("en"));
assertEquals(scdn1.getLang(), "en");
assertEquals(scdn1.getDisplayName(), "Integral Security Transport");
DisplayName scdn2 = sc1.getDisplayName(new Locale("fr"));
assertEquals(scdn2.getDisplayName(), "Transport Int�gral de S�curit�");
assertEquals(sc1.getPortletNames().get(0), "PortletOne");
assertEquals(sc1.getPortletNames().get(1), "PortletTwo");
assertEquals(sc1.getPortletNames().get(2), "PortletThree");
Description des1 = sc1.getUserDataConstraint().getDescription(new Locale("en"));
assertEquals(des1.getLang(), "en");
assertEquals(des1.getDescription(), "This is the Integral Security Transport");
Description des2 = sc1.getUserDataConstraint().getDescription(new Locale("fr"));
assertEquals(des2.getLang(), "fr");
assertEquals(des2.getDescription(), "Ceci est le Transport Int�gral de S�curit�");
SecurityConstraint sc2 = scs.get(1);
assertEquals(sc2.getUserDataConstraint().getTransportGuarantee(), UserDataConstraint.CONFIDENTIAL);
scdn1 = sc2.getDisplayName(new Locale("en"));
assertEquals(scdn1.getLang(), "en");
assertEquals(scdn1.getDisplayName(), "Confidential Security Transport");
scdn2 = sc2.getDisplayName(new Locale("fr"));
assertEquals(scdn2.getDisplayName(), "Transport Confidentiel de S�curit�");
assertEquals(sc2.getPortletNames().get(0), "PortletA");
assertEquals(sc2.getPortletNames().get(1), "PortletB");
des1 = sc2.getUserDataConstraint().getDescription(new Locale("en"));
assertEquals(des1.getLang(), "en");
assertEquals(des1.getDescription(), "This is the Confidential Security Transport");