@Test
public void deleteGroup() throws Exception {

    this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
    Group sampleGroup = _groupRepo.findByName("sample");
    Assert.assertNotNull(sampleGroup);
    this.mockHttpSession = loginAsAdmin();
    this.mockMvc.perform(delete("/srv/api/groups/" + sampleGroup.getId())
        .session(this.mockHttpSession)
        .accept(MediaType.parseMediaType("application/json")))
        .andExpect(status().is(403));
    this.mockMvc.perform(delete("/srv/api/groups/" + sampleGroup.getId() + "?force=true")
        .session(this.mockHttpSession)
        .accept(MediaType.parseMediaType("application/json")))
        .andExpect(status().is(204));
    this.mockMvc.perform(get("/srv/api/groups/" + sampleGroup.getId())
        .session(this.mockHttpSession)
        .accept(MediaType.parseMediaType("application/json")))
        .andExpect(status().is(404));
    sampleGroup = _groupRepo.findByName("sample");
    Assert.assertNull(sampleGroup);
}