@Karussell Assertions and unit tests serve different purposes. When writing unit tests, you should use the junit assert functions. Inside your regular code, you should use the assert keyword if you want to test invariants and other conditions (which is a good idea).
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.