Assertions need to be enabled when you launch the JVM e.g.
$ java -ea ...
By default, assertions are disabled at runtime. Two command-line switches allow you to selectively enable or disable assertions.
To enable assertions at various granularities, use the -enableassertions, or -ea, switch
Note that you can enable/disable per class/package if you require.
As to how you perform this with IDEA, you need to modify the VM options for your particular run/debug configuration.