java.lang.AssertionError: Content type expected: but was:

petrikainulainen.net | 3 months ago
  1. 0

    Unit Testing of Spring MVC Controllers: REST API

    petrikainulainen.net | 4 months ago
    java.lang.AssertionError: Content type expected: but was:
  2. 0

    Unit Testing of Spring MVC Controllers: REST API

    petrikainulainen.net | 3 months ago
    java.lang.AssertionError: Content type expected: but was:
  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

    Mock MVC unexpected result - Code - Help To User

    helptouser.com | 1 year ago
    java.lang.AssertionError: Status expected:<200> but was:<404>
  6. 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

    Content type expected: but was:

    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.ContentResultMatchers$1.match(ContentResultMatchers.java:71)
    4. org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:141)
    4 frames