So my code is working with Firefox, but it is not working with Chrome. The erros is apparently in this line itself:
WebDriver driver = new ChromeDriver();
And here is the error log report:
Failed tests: setUp(com.TEST): The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list