Changed JUnit test to avoid use of assertNotEquals (not available before JUnit 4.11.