### Question:
WorkspaceItem implements InProgressSubmission { public void deleteWrapper() throws SQLException, AuthorizeException, IOException { AuthorizeManager.authorizeAction(ourContext, item, Constants.WRITE); log.info(LogManager.getHeader(ourContext, "delete_workspace_item", "workspace_item_id=" + getID() + "item_id=" + item.getID() + "collection_id=" + collection.getID())); ourContext.removeCached(this, getID()); DatabaseManager.delete(ourContext, wiRow); } WorkspaceItem(Context context, TableRow row); static WorkspaceItem find(Context context, int id); static WorkspaceItem create(Context c, Collection coll,
            boolean template); static WorkspaceItem createByItem(Context context, Item item); static WorkspaceItem[] findByEPerson(Context context, EPerson ep); static WorkspaceItem[] findByCollection(Context context, Collection c); static WorkspaceItem findByItem(Context context, Item i); static WorkspaceItem[] findAll(Context context); int getID(); int getStageReached(); void setStageReached(int v); int getPageReached(); void setPageReached(int v); void update(); boolean equals(Object o); int hashCode(); void deleteAll(); void deleteWrapper(); Item getItem(); Collection getCollection(); EPerson getSubmitter(); boolean hasMultipleFiles(); void setMultipleFiles(boolean b); boolean hasMultipleTitles(); void setMultipleTitles(boolean b); boolean isPublishedBefore(); void setPublishedBefore(boolean b);  }### Answer:
@Test(expected=AuthorizeException.class) public void testDeleteWrapperNoAuth() throws Exception { new NonStrictExpectations() { AuthorizeManager authManager; { AuthorizeManager.authorizeAction((Context) any, (Item) any, Constants.WRITE); result = new AuthorizeException(); } }; wi.deleteWrapper(); fail("Exception expected"); }