java.lang.AssertionError: Status expected:<404> but was:<406>

Stack Overflow | ScarOnTheSky | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Spring: Returning empty HTTP Responses with ResponseEntity<Void> doesn't work

    Stack Overflow | 3 years ago | ScarOnTheSky
    java.lang.AssertionError: Status expected:<404> but was:<406>
  2. 0

    Practical guide for applying ATDD + TDD (part 5) | AIW Solutions

    aiwsolutions.net | 1 year ago
    java.lang.AssertionError: Status expected:<200> but was:<404>
  3. 0

    Unit Test with Mock

    Stack Overflow | 2 years ago
    java.lang.AssertionError: Status expected:<200> but was:<400>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Failed test during integTest on spring-io/sagan

    GitHub | 3 years ago | marioja
    java.lang.AssertionError: Status expected:<200> but was:<404>
  6. 0

    GitHub comment 15#35897674

    GitHub | 3 years ago | mathieubodin
    java.lang.AssertionError: Status expected:<200> but was:<500>

  1. Dunmer 4 times, last 5 days ago
  2. olle.hallin 1 times, last 1 week ago
  3. Nikolay Rybak 1 times, last 3 weeks ago
  4. tvrmsmith 1 times, last 2 months ago
  5. iferca 1 times, last 5 months ago
58 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.AssertionError

    Status expected:<404> but was:<406>

    at org.springframework.test.util.AssertionErrors.fail()
  2. Spring TestContext
    MockMvc$1.andExpect
    1. org.springframework.test.util.AssertionErrors.fail(AssertionErrors.java:60)
    2. org.springframework.test.util.AssertionErrors.assertEquals(AssertionErrors.java:89)
    3. org.springframework.test.web.servlet.result.StatusResultMatchers$10.match(StatusResultMatchers.java:652)
    4. org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:153)
    4 frames
  3. de.zeb.control
    TaxonomyQueryControllerTest.taxonomyPackageDoesNotExist
    1. de.zeb.control.application.xbrlstandalonevalidator.restservice.TaxonomyQueryControllerTest.taxonomyPackageDoesNotExist(TaxonomyQueryControllerTest.java:54)
    1 frame
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  5. TestNG
    RemoteTestNG.main
    1. org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    2. org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    3. org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    4. org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    5. org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    6. org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    7. org.testng.TestRunner.privateRun(TestRunner.java:767)
    8. org.testng.TestRunner.run(TestRunner.java:617)
    9. org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    10. org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    11. org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    12. org.testng.SuiteRunner.run(SuiteRunner.java:240)
    13. org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    14. org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    15. org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    16. org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    17. org.testng.TestNG.run(TestNG.java:1057)
    18. org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    19. org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    20. org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
    20 frames