java.lang.AssertionError: expected [22] but found [21]

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 GitHub by ghatwala
, 1 year ago
expected [22] but found [21]
via GitHub by cberner
, 1 year ago
via JDK Bug System by Felix Yang, 1 year ago
expected [0] but found [1]
via Google Groups by ragingfury, 2 years ago
expected:<200> but was:<503>
via GitHub by epishkin
, 2 years ago
expected:<expected value> but was:<null>
via Google Groups by Prakash, 2 years ago
expected:<false> but was:<true>
java.lang.AssertionError: expected [22] but found [21]
at org.testng.Assert.failNotEquals(
at org.testng.Assert.assertEquals(
at org.testng.Assert.assertEquals(
at org.testng.Assert.assertEquals(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.testng.internal.MethodInvocationHelper.invokeMethod(
at org.testng.internal.Invoker.invokeMethod(
at org.testng.internal.Invoker.invokeTestMethod(
at org.testng.internal.Invoker.invokeTestMethods(
at org.testng.internal.TestMethodWorker.invokeTestMethods(
at org.testng.TestRunner.privateRun(
at org.testng.SuiteRunner.runTest(
at org.testng.SuiteRunner.runSequentially(
at org.testng.SuiteRunner.privateRun(
at org.testng.SuiteRunnerWorker.runSuite(
at org.testng.TestNG.runSuitesSequentially(
at org.testng.TestNG.runSuitesLocally(
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
at org.apache.maven.surefire.testng.TestNGProvider.invoke(
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(

Users with the same issue

2 times, 1 month ago
Once, 2 months ago
Once, 4 months ago
2 times, 6 months ago
3 times, 10 months ago

Write tip

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