@Test public void checkUnsubscribeContextImplemented() throws Exception { mockMvc .perform( post("/i/unsubscribeContext") .content(Util.json(jsonConverter, Util.createUnsubscribeContext())) .contentType(MediaType.APPLICATION_JSON) .header("Host", "localhost") .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()); }
@Test public void checkUnsubscribeContextImplementedInXml() throws Exception { mockMvc .perform( post("/i/unsubscribeContext") .content(xmlmapper.writeValueAsString(Util.createUnsubscribeContext())) .contentType(MediaType.APPLICATION_XML) .header("Host", "localhost") .accept(MediaType.APPLICATION_XML)) .andExpect(status().isOk()); }
@Test public void checkUnsubscribeContextNotImplemented() throws Exception { mockMvc .perform( post("/ni/unsubscribeContext") .content(Util.json(jsonConverter, Util.createUnsubscribeContext())) .contentType(MediaType.APPLICATION_JSON) .header("Host", "localhost") .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect( MockMvcResultMatchers.jsonPath("$.statusCode.code") .value(CodeEnum.CODE_403.getLabel())); }