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

Stack Overflow | tysonite | 4 months ago
  1. 0

    Does @WebMvcTest require @SpringBootApplication annotation?

    Stack Overflow | 4 months ago | tysonite
    java.lang.AssertionError: Status expected:<200> but was:<404>
  2. 0

    Mock MVC unexpected result - Code - Help To User

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

    Failed test during integTest on spring-io/sagan

    GitHub | 2 years ago | marioja
    java.lang.AssertionError: Status expected:<200> but was:<404>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

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

    Stack Overflow | 1 year ago | Yamini Tyagi
    java.lang.AssertionError: Status expected:<200> but was:<404>
  6. 0

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

    aiwsolutions.net | 11 months ago
    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

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

    at org.springframework.test.util.AssertionErrors.fail()
  2. Spring TestContext
    MockMvc$1.andExpect
    1. org.springframework.test.util.AssertionErrors.fail(AssertionErrors.java:54)
    2. org.springframework.test.util.AssertionErrors.assertEquals(AssertionErrors.java:81)
    3. org.springframework.test.web.servlet.result.StatusResultMatchers$10.match(StatusResultMatchers.java:664)
    4. org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:171)
    4 frames
  3. sample.test.web
    UserVehicleControllerTests.getVehicleWhenRequestingTextShouldReturnMakeAndModel
    1. sample.test.web.UserVehicleControllerTests.getVehicleWhenRequestingTextShouldReturnMakeAndModel(UserVehicleControllerTests.java:68)
    1 frame