java.lang.AssertionError: Expected: is not null but: was null

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

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by maggu2810
, 1 year ago
Expected: is not null but: was null
via GitHub by sjka
, 1 year ago
Expected: is not null but: was null
via GitHub by sjka
, 1 year ago
Expected: is "1.1.2" but: was "1.1.1"
via GitHub by sjka
, 10 months ago
Expected: is <ON> but: was <OFF>
via GitHub by maggu2810
, 1 year ago
Expected: is <OFF> but: was <ON>
via GitHub by maggu2810
, 1 year ago
Expected: is "ItemSampleRule" but: was "ItemSampleRuleWithReferences"
java.lang.AssertionError: Expected: is not null but: was null
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at org.junit.Assert.assertThat(Assert.java:832)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:53)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)

Users with the same issue

7 times, 4 months ago
Once, 1 year ago
Once, 1 year ago
Once, 6 months ago
7 times, 6 months ago

Write tip

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