Recently Selenium launched v3 and if you want to test with FF, then you have to use GeckoDriver like this:
System.setProperty("webdriver.gecko.driver","Path to geckodriver.exe");
WebDriver driver = new FirefoxDriver();
No need to set any desiredCapabilities().