Fix exception when run unit test with HtmlUnit webdriver