Update: Unfortunately this solution is not working any more with recent versions of Firefox and FirefoxDriver.
I spent some time currently to automate integration tests and webtests, mainly using spock and, for the web test part, geb.
Unfortunately I did not find any (simple) working example with basic auth. I