Tests should use `assertEquals` for consistency
Here’s a concise and effective response or resolution strategy for Issue #932 – "Tests should use assertEquals for consistency":
Issue Summary Inconsistent test assertions are used throughout the codebase — some tests may use assertThat(), assertTrue(), or raw comparisons, while others use assertEquals().
Using assertEquals(expected, actual) improves readability, IDE formatting, and error messages during test failures.
Recommended Fix Refactor test assertions to:
import org.junit.Assert.assertEquals
// Instead of:
assertTrue(result == expected)
assertThat(result, is(expected))
// Use: assertEquals(expected, result) Example Before → After Before:
assertTrue(user.name == "Alice") After:
assertEquals("Alice", user.name) Benefits Improves consistency across the test suite.
Easier failure debugging with clear diff in messages.
Standardizes best practices (especially in JUnit-based projects).