@Test public void testDownload() throws Exception { assertFalse(tester.getComponentFromLastRenderedPage("download").isEnabled()); // select resource tester.executeAjaxEvent( "treeview:rootView:/:children:temp:children:temp/dir:children:temp/dir/something:selectableLabel", "click"); assertTrue(tester.getComponentFromLastRenderedPage("download").isEnabled()); // rename resource tester.clickLink("download"); assertTrue(Arrays.equals(DATA.getBytes(), tester.getLastResponse().getBinaryContent())); }