title: MockMVC how to test exception and response code in the same test case
body: <p>I want to assert that an exception is raised and that the server returns an 500 internal server error.</p>
  
  <p>To highlight the intent a code snippet is provided:</p>
  
  <pre><code>thrown.expect(NestedServletException.class);
  this.mockMvc.perform(post("/account")
              .contentType(MediaType.APPLICATION_JSON)
              .content(requestString))
              .andExpect(status().isInternalServerError());
  </code></pre>
  
  <p>Of course it dosen't matter if I write <code>isInternalServerError</code> or <code>isOk</code>.
  The test will pass regardless if an exception is thrown below the <code>throw.except</code> statement.</p>
  
  <p>How would you go about to solve this?</p>