+ mockMvc.perform(post("/adapters/adapter").secure(true)
+ .contentType(MediaType.APPLICATION_JSON)
+ .content(GSON.toJson(adapter)))
+ .andDo(print())
+ .andExpect(status().isBadRequest());
+ }
+
+ @Test
+ void testUnauthorized() throws Exception {
+ mockMvc.perform(post("/adapters/adapter").secure(true))
+ .andDo(print())
+ .andExpect(status().isUnauthorized());
+
+ mockMvc.perform(post("/adapters/adapter").secure(true))
+ .andDo(print())
+ .andExpect(status().isUnauthorized());
+
+ mockMvc.perform(delete("/adapters/adapter/172.10.55.3").secure(true))
+ .andDo(print())
+ .andExpect(status().isUnauthorized());