String content = result.andReturn().getResponse().getContentAsString();
System.out.println(content);
System.out.println();
- assertEquals(strip("{\"syscall\":[],\"pad\":[{\"mode\":\"debug\",\"date\":\"12:25 PM; May 08, 2017\",\"start_symbol\":\"_text\","
- + "\"gpa\":\"7fffd19c5592\",\"end_symbol\":\"__start_rodata\",\"operation\":\"write\"}],\"dac\":[{\"date\":\"12:25 PM; May 08, 2017\"},{\"date\":\"12/11/2016\"}],\"smack\":"
- + "[{\"ppid_comm\":\"bash\",\"date\":\"12:25 PM; May 08, 2017\",\"wait\":\"no\",\"comm\":\"bash\",\"subject\":\"User\","
- + "\"lsm\":\"SMACK\",\"fn\":\"smack_inode_getattr\",\"pid\":\"23926\",\"ino\":\"18596\",\"ppid\":\"22847\","
- + "\"mode\":\"enforcing\",\"d_inst\":\"1\",\"path\":\"/tmp/wm_start\",\"requested\":\"r\","
- + "\"dev\":\"tmpfs\",\"action\":\"denied\",\"user_bt\":\"23926\",\"object\":\"System\"}],\"dlp\":[]}"), strip(content));
+ assertEquals(strip("{\"syscall\":[],\"pad\":[{\"mode\":\"debug\",\"date\":\"12:25PM;May08,2017\",\"start_symbol\":\"_text\","
+ + "\"gpa\":\"7fffd19c5592\",\"end_symbol\":\"__start_rodata\",\"operation\":\"write\"}],\"dac\":[{\"date\":\"12:25PM;May08,2017\"},"
+ + "{\"date\":\"12:25PM;May08,2017\"},{\"date\":\"12/11/2016\"}],\"smack\":[{\"ppid_comm\":\"bash\",\"date\":\"12:25PM;May08,2017\","
+ + "\"wait\":\"no\",\"comm\":\"bash\",\"subject\":\"User\",\"lsm\":\"SMACK\",\"fn\":\"smack_inode_getattr\",\"pid\":\"23926\",\"ino\":"
+ + "\"18596\",\"ppid\":\"22847\",\"mode\":\"enforcing\",\"d_inst\":\"1\",\"path\":\"/tmp/wm_start\",\"requested\":\"r\",\"dev\":\"tmpfs\","
+ + "\"action\":\"denied\",\"user_bt\":\"23926\",\"object\":\"System\"}],\"dlp\":[]}"), strip(content));
}
private String strip(String str) {
*/
@Test(expected = NestedServletException.class)
public void newReportNotificationWrongReport() throws Exception {
- mockMvc.perform(get("/restapi/report/newreport/" + reportId1)).andExpect(status().isOk());
+ mockMvc.perform(get("/restapi/report/newreport/1" + reportId1)).andExpect(status().isOk());
}
/**