I have created a functional test, which works fine when driver is FireFox or Chrome. The same fails when i try to use HtmlUnit driver. The application gets started, but gets stuck while running the first test. Then i have kill the java process to stop it.
Pasting the code snippet that i use to initialize the htmlunit driver
driver = {
def driver = new HtmlUnitDriver()
driver.javascriptEnabled = true
baseUrl = 'http://localhost:8585'
driver }