@Test
public void getDeliveryThatDoesNotExistOnAProductThatExist(){

    final DbProduct product = new DbProduct();
    product.setName("product1");
    // creating a dummy product in storage
    when(repositoryHandler.getProduct(product.getName())).thenReturn(product);
    // request
    WebResource resource = client().resource("/" + ServerAPI.PRODUCT_RESOURCE + "/" + product.getName() + ServerAPI.GET_DELIVERIES+ "/doesNotExist/1.0.0");
    ClientResponse response = resource.type(MediaType.APPLICATION_JSON).get(ClientResponse.class);
    
    // checks
    assertNotNull(response);
    assertEquals(HttpStatus.NOT_FOUND_404, response.getStatus());
}