java.lang.AssertionError: expected:<4> but was:<5>

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Check your pattern declaration or check your assert declaration.

java.lang.AssertionError: expected:<4> but was:<5>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)

Users with the same issue

Once, 10 months ago
Once, 1 month ago
2 times, 11 months ago
3 times, 9 months ago
69 times, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.