@Test
  public void testInsert() throws Exception {
    Product product = new Product();
    product.setName(PRODUCT_NAME);
    product.setDescription("description");

    Product createdProduct = productResource.insert(product);
    assertEquals(createdProduct.getName(), PRODUCT_NAME);
  }
  @Before
  public void setUp() throws Exception {
    productResource = new ProductResourceImpl();
    ProductManager productManager = mock(ProductManager.class);
    productResource.setProductManager(productManager);
    Product product = new Product(PRODUCT_NAME, "description");
    OS os = new OS("os1", "1", "os1 description", "v1");

    ProductRelease productRelease =
        new ProductRelease(PRODUCT_VERSION, "releaseNotes", product, Arrays.asList(os), null);
    List<ProductRelease> lProductRelease = new ArrayList<ProductRelease>();
    lProductRelease.add(productRelease);

    when(productManager.insert(any(Product.class))).thenReturn(product);
    when(productManager.load(any(String.class))).thenReturn(product);
    doNothing().when(productManager).delete(any(Product.class));
  }
 @Test
 public void testDelete() throws Exception {
   productResource.delete(PRODUCT_NAME);
 }