XactionUtil { static void deleteContentItem( IContentItem contentItem, IUnifiedRepository unifiedRepository ) { if ( contentItem instanceof RepositoryFileContentItem ) { String path = contentItem.getPath(); RepositoryFile repositoryFile = unifiedRepository.getFile( path ); if ( repositoryFile != null ) { unifiedRepository.deleteFile( repositoryFile.getId(), true, null ); } } else if ( contentItem instanceof FileContentItem ) { String path = ( (FileContentItem) contentItem ).getFile().getName(); logger.warn( Messages.getInstance().getString( "XactionUtil.SKIP_REMOVING_OUTPUT_FILE", path ) ); } }  @SuppressWarnings ( "rawtypes" ) static void createOutputFileName( RepositoryFile file, IOutputHandler outputHandler ); static OutputStream getOutputStream( HttpServletResponse response, boolean doMessages ); static void setupOutputHandler( HttpOutputHandler outputHandler, IParameterProvider requestParameters ); static HttpOutputHandler createOutputHandler( HttpServletResponse response, OutputStream outputStream ); static String postExecute( IRuntimeContext runtime, boolean debugMessages, boolean doWrapper,
                                    IOutputHandler outputHandler, Map<String, IParameterProvider> parameterProviders,
                                    HttpServletRequest request,
                                    HttpServletResponse response, List<?> messages, boolean deleteGeneratedFiles ); @SuppressWarnings ( { "unchecked", "rawtypes" } ) static String executeHtml( RepositoryFile file, HttpServletRequest httpServletRequest,
                                    HttpServletResponse httpServletResponse, IPentahoSession userSession,
                                    IMimeTypeListener mimeTypeListener ); @SuppressWarnings ( { "unchecked", "rawtypes" } ) static String executeScheduleUi( RepositoryFile file, HttpServletRequest httpServletRequest,
                                          HttpServletResponse httpServletResponse, IPentahoSession userSession,
                                          IMimeTypeListener mimeTypeListener ); @SuppressWarnings ( { "unchecked", "rawtypes" } ) static String executeXml( RepositoryFile file, HttpServletRequest httpServletRequest,
                                   HttpServletResponse httpServletResponse, IPentahoSession userSession ); static String execute( String returnContentType, RepositoryFile file, HttpServletRequest httpServletRequest,
                                HttpServletResponse httpServletResponse, IPentahoSession userSession,
                                IMimeTypeListener mimeTypeListener ); @SuppressWarnings ( { "unchecked", "rawtypes" } ) static String doParameter( final RepositoryFile file, IParameterProvider parameterProvider,
                                    final IPentahoSession userSession );  }
@Test public void testDeleteContentItem_null() throws Exception { XactionUtil.deleteContentItem( null, null ); XactionUtil.deleteContentItem( null, mock( IUnifiedRepository.class ) ); verify( repository, times( 0 ) ).deleteFile( anyString(), anyBoolean(), anyString() ); }