public static Document loadXMLFile( String filename ) throws KettleXMLException {
    try {
      return loadXMLFile( KettleVFS.getFileObject( filename ) );
    } catch ( Exception e ) {
      throw new KettleXMLException( e );
    }
  }
@Test
  public void loadFile_ExceptionCheckingFile() throws Exception {
    FileObject fileObjectMock = mock( FileObject.class );
    doReturn( true ).when( fileObjectMock ).exists();
    doThrow( new FileSystemException( DUMMY ) ).when( fileObjectMock ).isFile();

    try {
      XMLHandler.loadXMLFile( fileObjectMock );
    } catch ( KettleXMLException e ) {
      System.out.println( e.getMessage() );
      assertTrue( e.getMessage().contains( "Unable to check if file" ) );
    }
  }