this.setUserOnSession("admin");
this.initAction("/do/jpversioning/Resource/Trash", "list");
this.addParameter("resourceTypeCode", "Image");
String result = this.executeAction();
assertEquals("success", result);
ITrashedResourceAction action = (ITrashedResourceAction) this.getAction();
List<String> trashedResources = action.getTrashedResources();
assertNotNull(trashedResources);
assertEquals(5, trashedResources.size());
assertEquals("67", trashedResources.get(0));
this.setUserOnSession("admin");
this.initAction("/do/jpversioning/Resource/Trash", "list");
this.addParameter("resourceTypeCode", "Image");
this.addParameter("text", "tux");
result = this.executeAction();
assertEquals("success", result);
action = (ITrashedResourceAction) this.getAction();
trashedResources = action.getTrashedResources();
assertNotNull(trashedResources);
assertEquals(1, trashedResources.size());
assertEquals("70", trashedResources.get(0));
this.initAction("/do/jpversioning/Resource/Trash", "list");
this.addParameter("resourceTypeCode", "Attach");
result = this.executeAction();
assertEquals("success", result);
action = (ITrashedResourceAction) this.getAction();
trashedResources = action.getTrashedResources();
assertNotNull(trashedResources);
assertEquals(1, trashedResources.size());
assertEquals("66", trashedResources.get(0));
}