java.lang.AssertionError: JSON path$.nr expected:<5> but was:<5>

Spring JIRA | Johannes Mockenhaupt | 4 years ago
  1. 0

    Unit Test with Mock

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

    Automated exception search integrated into your IDE

  3. 0

    Mock MVC unexpected result - Code - Help To User

    helptouser.com | 1 year ago
    java.lang.AssertionError: Status expected:<200> but was:<404>
  4. 0

    Failed test during integTest on spring-io/sagan

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

  1. tvrmsmith 6 times, last 3 months ago
57 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

    JSON path$.nr expected:<5> but was:<5>

    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.util.JsonPathExpectationsHelper.assertValue(JsonPathExpectationsHelper.java:99)
    4. org.springframework.test.web.servlet.result.JsonPathResultMatchers$2.match(JsonPathResultMatchers.java:65)
    5. org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:141)
    5 frames