@SuppressWarnings("unchecked") public void testDemoListLoaded() { // print(tester.getLastRenderedPage(), true, true); /* * Expected choices are the file names in the demo requests dir * (/src/test/resources/test-data/demo-requests in this case) */ final List<String> expectedList = Arrays.asList(new String[] {"WFS_getFeature-1.1.xml", "WMS_describeLayer.url"}); DropDownChoice dropDown = (DropDownChoice) tester.getComponentFromLastRenderedPage("demoRequestsForm:demoRequestsList"); List choices = dropDown.getChoices(); assertEquals(expectedList, choices); }