@Test
public void deleteAProductWithoutDeletionRights(){

    final DbProduct product = new DbProduct();
    product.setName("product1");
    when(repositoryHandler.getProduct(product.getName())).thenReturn(product);
    client().addFilter(new HTTPBasicAuthFilter(GrapesTestUtils.WRONG_USER_4TEST, GrapesTestUtils.WRONG_PASSWORD_4TEST));
    WebResource resource = client().resource("/" + ServerAPI.PRODUCT_RESOURCE + "/" + product.getName());
    ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).delete(ClientResponse.class);
    assertNotNull(response);
    assertEquals(HttpStatus.UNAUTHORIZED_401, response.getStatus());
}