@Test
public void updateGroup() throws Exception {

    Group groupToUpdate = _groupRepo.findByName("sample");
    Assert.assertNotNull(groupToUpdate);
    groupToUpdate.setEmail("group@mail.com");
    groupToUpdate.setDescription("A test group");
    groupToUpdate.setWebsite("http://link");
    Gson gson = new GsonBuilder()
        .setFieldNamingStrategy(new JsonFieldNamingStrategy())
        .setExclusionStrategies(new FieldNameExclusionStrategy("_labelTranslations"))
        .create();
    String json = gson.toJson(groupToUpdate);
    this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
    this.mockHttpSession = loginAsAdmin();
    this.mockMvc.perform(put("/srv/api/groups/" + groupToUpdate.getId())
        .content(json)
        .contentType(API_JSON_EXPECTED_ENCODING)
        .session(this.mockHttpSession)
        .accept(MediaType.parseMediaType("application/json")))
        .andExpect(status().is(204));
}