@Test
public void updateVirtualCsw() throws Exception {

    Service service = _serviceRepo.findOneByName("csw-endpoint1");
    Assert.assertNotNull(service);
    service.setDescription("A CSW test endpoint - 1 - updated");
    service.setExplicitQuery("query");
    Gson gson = new GsonBuilder()
        .setFieldNamingStrategy(new JsonFieldNamingStrategy())
        .create();
    String json = gson.toJson(service);
    this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
    this.mockHttpSession = loginAsAdmin();
    this.mockMvc.perform(put("/srv/api/csw/virtuals/" + service.getId())
        .content(json)
        .contentType(API_JSON_EXPECTED_ENCODING)
        .session(this.mockHttpSession)
        .accept(MediaType.parseMediaType("application/json")))
        .andExpect(status().is(204));
}