java.lang.AssertionError: expected:<null> but was:<>

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.

,

My guess is there is some kind of static state in the code being tested or in the test itself, so the tests aren't isolated. Adding the test changes the test order. In any case, your best course of action is to use the debugger to see why the tests fail.

Solutions on the web

via GitHub by stevej
, 11 months ago
via GitHub by hasancelik
, 2 years ago
expected:<0> but was:<1>
via agilefaqs.com by Unknown author, 9 months ago
via GitHub by phax
, 2 years ago
expected:<sha512> but was:<null>
via Stack Overflow by Unknown author, 2 years ago
expected:<[java.lang.Object@56d5e457, java.lang.Object@7482384a]> but was:<null>
via GitHub by hasancelik
, 2 years ago
expected:<500> but was:<4156>
java.lang.AssertionError: expected:<null> but was:<>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:144)
at io.grpc.testing.integration.AbstractInteropTest.computeEngineCreds(AbstractInteropTest.java:1091)
at io.grpc.testing.integration.TestServiceClient.runTest(TestServiceClient.java:236)
at io.grpc.testing.integration.TestServiceClient.run(TestServiceClient.java:200)
at io.grpc.testing.integration.TestServiceClient.main(TestServiceClient.java:84)

Users with the same issue

Once, 1 day ago
8 times, 6 days ago
Once, 1 week ago
53 times, 1 week ago
Once, 2 weeks ago

Write tip

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