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

  1. ,
    Expert tip

    Check your pattern declaration or check your assert declaration.

  2. ,

    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 Spring JIRA by Michael Ottati, 1 year ago
Expected :Entity of type org.springframework.data.jpa.example.auditing.AuditableUser with id: 1 Actual :null <Click to see difference>
via Spring JIRA by Michael Ottati, 1 year ago
Expected :Entity of type org.springframework.data.jpa.example.auditing.AuditableUser with id: 1 Actual :null <Click to see difference>
via GitHub by xingfengshen
, 2 years ago
expected:<0> but was:<1>
via GitHub by wildfly-ci
, 1 year ago
expected:<2> but was:<1>
via GitHub by acslk
, 1 year ago
expected:<1> but was:<0>
via GitHub by gianm
, 1 year ago
expected:<1> but was:<0>
java.lang.AssertionError: 
Expected :Entity of type org.springframework.data.jpa.example.auditing.AuditableUser with id: 1
Actual   :null
 <Click to see difference>	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 org.springframework.data.jpa.example.repository.AuditableUserSample.testname(AuditableUserSample.java:48)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)