java.lang.AssertionError: Expected: is "my name" 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

Solutions on the web

via Stack Overflow by Saumya A
, 1 year ago
Expected: is "my name" but: was null
via GitHub by longtimeago
, 1 year ago
Expected: iterable containing [<[is "str0", is "str1", is "str2"]>] but: item 0: was "str0"
via Stack Overflow by I.K.
, 2 years ago
Expected: iterable containing [&lt;[Item{name=iPhone}, Item{name=Skateboard}]&gt;] but: item 0: was &lt;Item{name=iPhone}&gt;
via openwritings.net by Unknown author, 1 year ago
Expected: a string containing "Not found" but: was "Assert string containing something."
via GitHub by pinaf
, 1 year ago
Expected: <[lists-exists, sub/file]> but: was <[sub/file, lists-exists]>
via GitHub by carlosmiranda
, 1 year ago
Expected: <200> but: was <RsWithStatus(super=RsWrap(origin=org.takes.rs.RsWithStatus$1@76ccd017))>
java.lang.AssertionError: Expected: is "my name" but: was null
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
at com.dev.impl.CodeImplTest.testGetCode(CodeImplTest.java:74)

Users with the same issue

3 times, 2 months ago
2 times, 3 months ago
3 times, 6 months ago
25 times, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
23 more bugmates

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