MuleEvent response = flow.process(getTestEvent(testObjects));
List<CatalogAssignedProduct> catalogAssignedProducts = (List<CatalogAssignedProduct>) response.getMessage().getPayload();
assertEquals("There should be one product in the category", 1, catalogAssignedProducts.size());
CatalogAssignedProduct catalogAssignedProduct = catalogAssignedProducts.get(0);
assertEquals("Assert that the product id is what it is expected to be", testObjects.get("productId"), catalogAssignedProduct.getProduct_id());
}
catch (Exception e) {
e.printStackTrace();
fail();