diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/RecipeTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/RecipeTest.java
new file mode 100644
index 0000000..49dc9b7
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/RecipeTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Timestamp;
+
+import org.junit.Test;
+import org.openecomp.mso.db.catalog.beans.Recipe;
+
+/**
+ */
+
+public class RecipeTest {
+
+	@Test
+	public final void recipeDataTest() {
+		Recipe recipe = new Recipe();
+		recipe.setAction("action");
+		assertTrue(recipe.getAction().equalsIgnoreCase("action"));
+		recipe.setCreated(new Timestamp(System.currentTimeMillis()));
+		assertTrue(recipe.getCreated() != null);
+		recipe.setDescription("description");
+		assertTrue(recipe.getDescription().equalsIgnoreCase("description"));
+		recipe.setId(1);
+		assertTrue(recipe.getId() == 1);
+		recipe.setOrchestrationUri("orchestrationUri");
+		assertTrue(recipe.getOrchestrationUri().equalsIgnoreCase("orchestrationUri"));
+		recipe.setRecipeTimeout(1);
+		assertTrue(recipe.getRecipeTimeout() == 1);
+		recipe.setServiceType("serviceType");
+		assertTrue(recipe.getServiceType().equalsIgnoreCase("serviceType"));
+//		assertTrue(recipe.toString() != null);
+	}
+
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/ServiceMacroHolderTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/ServiceMacroHolderTest.java
new file mode 100644
index 0000000..0e34921
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/ServiceMacroHolderTest.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.test;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization;
+import org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization;
+import org.openecomp.mso.db.catalog.beans.ServiceMacroHolder;
+import org.openecomp.mso.db.catalog.beans.VnfResource;
+import org.openecomp.mso.db.catalog.beans.VnfResourceCustomization;
+
+/**
+ */
+
+public class ServiceMacroHolderTest {
+
+	@Test
+	public final void serviceMacroHolderDataTest() {
+		ServiceMacroHolder serviceMacroHolder = new ServiceMacroHolder();
+		assertTrue(serviceMacroHolder.getService() == null);
+		serviceMacroHolder.addVnfResource(new VnfResource());
+		serviceMacroHolder.addVnfResourceCustomizations(new VnfResourceCustomization());
+		serviceMacroHolder.addNetworkResourceCustomization(new NetworkResourceCustomization());
+		serviceMacroHolder.addAllottedResourceCustomization(new AllottedResourceCustomization());
+		assertTrue(serviceMacroHolder != null);
+	}
+
+}
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/ServiceRecipeTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/ServiceRecipeTest.java
new file mode 100644
index 0000000..4b4a5ad
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/ServiceRecipeTest.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Timestamp;
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
+
+/**
+ */
+
+public class ServiceRecipeTest {
+
+	@Test
+	public final void serviceRecipeDataTest() {
+
+		ServiceRecipe serviceRecipe = new ServiceRecipe();
+		serviceRecipe.setAction("action");
+		assertTrue(serviceRecipe.getAction().equalsIgnoreCase("action"));
+		serviceRecipe.setCreated(new Timestamp(System.currentTimeMillis()));
+		assertTrue(serviceRecipe.getCreated() != null);
+		serviceRecipe.setDescription("description");
+		assertTrue(serviceRecipe.getDescription().equalsIgnoreCase("description"));
+		serviceRecipe.setId(1);
+		assertTrue(serviceRecipe.getId() == 1);
+		serviceRecipe.setOrchestrationUri("orchestrationUri");
+		assertTrue(serviceRecipe.getOrchestrationUri().equalsIgnoreCase("orchestrationUri"));
+		serviceRecipe.setRecipeTimeout(1);
+		assertTrue(serviceRecipe.getRecipeTimeout() == 1);
+		serviceRecipe.setVersion("version");
+		assertTrue(serviceRecipe.getVersion().equalsIgnoreCase("version"));
+		serviceRecipe.setServiceTimeoutInterim(1);
+		assertTrue(serviceRecipe.getServiceTimeoutInterim() == 1);
+		serviceRecipe.setServiceParamXSD("serviceParamXSD");
+		assertTrue(serviceRecipe.getServiceParamXSD().equalsIgnoreCase("serviceParamXSD"));
+		assertTrue(serviceRecipe.toString() != null);
+		ServiceRecipe serviceRecipeWithValue = new ServiceRecipe(1, "string", "string", "string", "string", "string", 1,
+				1, new Date());
+		assertTrue(serviceRecipeWithValue.toString() != null);
+
+	}
+
+}
