After I typed "@Test" (without the quotes) and then hit Enter, IntelliJ suggested adding the "import org.junit.Test;"
statement by pressing Alt + Enter.
However, every time I tried to do this, IntelliJ presented me with a "Generate" menu instead of adding the suggested import statement.
In the past, I've successfully used Alt + Enter in IntelliJ 13 on my Windows 7 Professional workstation at work.
Currently, I am having the problem with Alt + Enter not working on a brand-new installation of IntelliJ 14 that I have running on Windows 7 Professional via Bootcamp on my MacBook Pro. I have left the Bootcamp keyboard settings at their defaults. So fn+option is equivalent to Alt, and works fine in other programs.
Therefore, fn + option(Alt) + enter should work in IntelliJ to accept a suggestion.
However, as described above, this is not the case on my system. Does anyone have any ideas for how to fix this?
UPDATE: @Danny provided the solution: On a MacBook Pro running IntelliJ IDEA 14 on Windows 7 via Bootcamp, press option + enter (without the fn) for the equivalent behavior of pressing Alt + Enter on traditional PCs.
This works to accept IntelliJ suggestions such as adding import statements to your code needed by dependencies.