use of org.onap.so.db.catalog.beans.ServiceRecipe in project so by onap.
the class ServiceInstanceRestHandlerTest method test_find_service_recipe_not_found.
@Test
public void test_find_service_recipe_not_found() throws MalformedURLException, NoRecipeException {
ServiceRecipe expected = new ServiceRecipe();
expected.setAction("createInstance");
doReturn(null).when(catalogDbClient).findServiceRecipeByActionAndServiceModelUUID(Action.createInstance.toString(), "testModelId");
doReturn(null).when(catalogDbClient).findServiceRecipeByActionAndServiceModelUUID(Action.createInstance.toString(), "d88da85c-d9e8-4f73-b837-3a72a431622b");
exceptionRule.expect(NoRecipeException.class);
exceptionRule.expectMessage("Unable to locate custom or default recipe for, Action: createInstance, Model UUID: testModelId");
restHandler.findServiceRecipe("testModelId", Action.createInstance.toString());
}
Aggregations