Assert are disabled unless you pass the -ea
(enable assertions) command line option to the JVM.
For Eclipse, you may follow this link: Setting execution arguments
Add -ea
to the VM arguments:
VM Arguments: Values meant to change the behavior of the Java virtual
machine (VM). For example, you may need to tell the VM whether to use
a just-in-time (JIT) compiler, or you may need to specify the maximum
heap size the VM should use. Refer to your VM's documentation for more
information about the available VM arguments.
Alternatively, this can be done widely on the JRE: Adding a new JRE definition
In the Default VM Arguments field, you can add/edit the default
arguments that will be passed to the VM when launching.