Magento 2 has an official manual for PHPStorm, but IntelliJ IDEA has some differencies in setup:
The latest IntelliJ IDEA (2016.2.5) does not have the «Use custom autoloader» option (used in the manual for PHPStorm).
You should use the «Path to phpunit.phar» option instead (marked with «1» on my screenshot).
The rest setup steps are the same as PHPStorm, read them in the official manual for PHPStorm.
An example of testing screen: