diff --git a/test/ldap_config_test.cpp b/test/ldap_config_test.cpp
index 05cea20..74c8171 100644
--- a/test/ldap_config_test.cpp
+++ b/test/ldap_config_test.cpp
@@ -71,22 +71,32 @@
     }
     MOCK_METHOD1(restartService, void(const std::string& service));
     MOCK_METHOD1(stopService, void(const std::string& service));
-    std::unique_ptr<Config>& getConfigPtr()
+    std::unique_ptr<Config>& getOpenLdapConfigPtr()
     {
-        return configPtr;
+        return openLDAPConfigPtr;
     }
 
     std::string configBindPassword()
     {
-        return getConfigPtr()->lDAPBindPassword;
+        return getADConfigPtr()->lDAPBindPassword;
     }
 
-    void restore(const char* filePath)
+    std::unique_ptr<Config>& getADConfigPtr()
     {
-        phosphor::ldap::ConfigMgr::restore(filePath);
+        return ADConfigPtr;
+    }
+    void restore()
+    {
+        // TODO enable it in later commit.
+        // phosphor::ldap::ConfigMgr::restore();
         return;
     }
 
+    void createDefaultObjects()
+    {
+        phosphor::ldap::ConfigMgr::createDefaultObjects();
+    }
+
     friend class TestLDAPConfig;
 };
 
@@ -105,32 +115,65 @@
     MockConfigMgr manager(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
                           dbusPersistentFilePath.c_str(),
                           tlsCacertfile.c_str());
+
+    EXPECT_CALL(manager, stopService("nslcd.service")).Times(1);
     EXPECT_CALL(manager, restartService("nslcd.service")).Times(2);
     EXPECT_CALL(manager, restartService("nscd.service")).Times(1);
     manager.createConfig(
         "ldap://9.194.251.136/", "cn=Users,dc=com", "cn=Users,dc=corp",
         "MyLdap12", ldap_base::Create::SearchScope::sub,
         ldap_base::Create::Type::ActiveDirectory, "uid", "gid");
-    manager.getConfigPtr()->enabled(true);
+    manager.getADConfigPtr()->enabled(true);
 
     EXPECT_TRUE(fs::exists(configFilePath));
-    EXPECT_EQ(manager.getConfigPtr()->lDAPServerURI(), "ldap://9.194.251.136/");
-    EXPECT_EQ(manager.getConfigPtr()->lDAPBindDN(), "cn=Users,dc=com");
-    EXPECT_EQ(manager.getConfigPtr()->lDAPBaseDN(), "cn=Users,dc=corp");
-    EXPECT_EQ(manager.getConfigPtr()->lDAPSearchScope(),
+    EXPECT_EQ(manager.getADConfigPtr()->lDAPServerURI(),
+              "ldap://9.194.251.136/");
+    EXPECT_EQ(manager.getADConfigPtr()->lDAPBindDN(), "cn=Users,dc=com");
+    EXPECT_EQ(manager.getADConfigPtr()->lDAPBaseDN(), "cn=Users,dc=corp");
+    EXPECT_EQ(manager.getADConfigPtr()->lDAPSearchScope(),
               ldap_base::Config::SearchScope::sub);
-    EXPECT_EQ(manager.getConfigPtr()->lDAPType(),
+    EXPECT_EQ(manager.getADConfigPtr()->lDAPType(),
               ldap_base::Config::Type::ActiveDirectory);
-    EXPECT_EQ(manager.getConfigPtr()->userNameAttribute(), "uid");
-    EXPECT_EQ(manager.getConfigPtr()->groupNameAttribute(), "gid");
-    EXPECT_EQ(manager.getConfigPtr()->lDAPBindDNPassword(), "");
+
+    EXPECT_EQ(manager.getADConfigPtr()->userNameAttribute(), "uid");
+    EXPECT_EQ(manager.getADConfigPtr()->groupNameAttribute(), "gid");
+    EXPECT_EQ(manager.getADConfigPtr()->lDAPBindDNPassword(), "");
     EXPECT_EQ(manager.configBindPassword(), "MyLdap12");
     // change the password
-    manager.getConfigPtr()->lDAPBindDNPassword("MyLdap14");
-    EXPECT_EQ(manager.getConfigPtr()->lDAPBindDNPassword(), "");
+    manager.getADConfigPtr()->lDAPBindDNPassword("MyLdap14");
+    EXPECT_EQ(manager.getADConfigPtr()->lDAPBindDNPassword(), "");
     EXPECT_EQ(manager.configBindPassword(), "MyLdap14");
 }
 
+TEST_F(TestLDAPConfig, testDefaultObject)
+{
+    auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
+    auto tlsCacertfile = std::string(dir.c_str()) + "/" + tslCacertFile;
+    auto dbusPersistentFilePath =
+        std::string(dir.c_str()) + "/" + dbusPersistFile;
+
+    if (fs::exists(configFilePath))
+    {
+        fs::remove(configFilePath);
+    }
+    EXPECT_FALSE(fs::exists(configFilePath));
+
+    MockConfigMgr manager(bus, LDAP_CONFIG_ROOT, configFilePath.c_str(),
+                          dbusPersistentFilePath.c_str(),
+                          tlsCacertfile.c_str());
+
+    EXPECT_CALL(manager, stopService("nslcd.service")).Times(2);
+
+    manager.createDefaultObjects();
+
+    EXPECT_NE(nullptr, manager.getADConfigPtr());
+    EXPECT_NE(nullptr, manager.getOpenLdapConfigPtr());
+    EXPECT_EQ(manager.getADConfigPtr()->lDAPType(),
+              ldap_base::Config::Type::ActiveDirectory);
+    EXPECT_EQ(manager.getOpenLdapConfigPtr()->lDAPType(),
+              ldap_base::Config::Type::OpenLdap);
+}
+/*
 TEST_F(TestLDAPConfig, testRestores)
 {
     auto configFilePath = std::string(dir.c_str()) + "/" + ldapconfFile;
@@ -399,5 +442,6 @@
               ldap_base::Config::Type::OpenLdap);
     delete managerPtr;
 }
+*/
 } // namespace ldap
 } // namespace phosphor
