title: Spring Data Rest Content Type
body: <p>I am writing unit tests for my application with Spring Data Rest MongoDB. Based on Josh's "Building REST services with Spring" get start guide, I have the following test code:</p>
  
  <pre><code>    @Test
      public void readSingleAccount() throws Exception {
      mockMvc.perform(get("/accounts/"
              + this.account.getId()))
              .andExpect(status().isOk())
              .andExpect(content().contentType(contentType))
              .andExpect(jsonPath("$.id", is(this.account.getId())))
                      .andExpect(jsonPath("$.email", is(this.account.getEmail())))
                      .andExpect(jsonPath("$.password", is(this.account.getPassword())));
     }
  </code></pre>
  
  <p>And this test fails on the content type.</p>
  
  <pre><code>Content type expected:&lt;application/json;charset=UTF-8&gt; but was:    &lt;application/hal+json&gt;
  Expected :application/json;charset=UTF-8
  Actual   :application/hal+json
  </code></pre>
  
  <p>I don't see <a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/MediaType.html" rel="nofollow">MediaType</a> come with HAL. Is the content type defined in another class?</p>