Eclipse: Enable assert statements
To enable assertions, you need to modify the run configuration:
To enable (make active) assert statements, you must set a flag to the compiler. Go to Run -> Run… -> Arguments, and in the box labeled VM arguments:, enter either -enableassertions or just -ea. Accept the changes and close the dialog.