The arguments to JUnit's assert* methods are in the wrong order. Contrary to intuition, it needs to be (expected, actual), not (actual, expected).