Use ListInstance typedef in more places

Change-Id: Ic41218a1e09f76d7455816163d9b3ca24b0b94ca
diff --git a/tests/cd.cpp b/tests/cd.cpp
index 32d7230..192b2cc 100644
--- a/tests/cd.cpp
+++ b/tests/cd.cpp
@@ -101,7 +101,7 @@
             SECTION("example:list[number=1]")
             {
                 input = "cd example:list[number=1]";
-                auto keys = std::map<std::string, leaf_data_>{
+                auto keys = ListInstance {
                     {"number", int32_t{1}}};
                 expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, listElement_("list", keys)));
             }
@@ -109,7 +109,7 @@
             SECTION("example:list[number=1]/contInList")
             {
                 input = "cd example:list[number=1]/contInList";
-                auto keys = std::map<std::string, leaf_data_>{
+                auto keys = ListInstance {
                     {"number", int32_t{1}}};
                 expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, listElement_("list", keys)));
                 expected.m_path.m_nodes.push_back(dataNode_(container_("contInList")));
@@ -118,7 +118,7 @@
             SECTION("example:twoKeyList[number=4][name='abcd']")
             {
                 input = "cd example:twoKeyList[number=4][name='abcd']";
-                auto keys = std::map<std::string, leaf_data_>{
+                auto keys = ListInstance {
                     {"number", int32_t{4}},
                     {"name", std::string{"abcd"}}};
                 expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, listElement_("twoKeyList", keys)));
diff --git a/tests/data_query.cpp b/tests/data_query.cpp
index 410c7c4..5bc3222 100644
--- a/tests/data_query.cpp
+++ b/tests/data_query.cpp
@@ -21,7 +21,7 @@
 #include "utils.hpp"
 
 namespace std {
-std::ostream& operator<<(std::ostream& s, const std::vector<std::map<std::string, leaf_data_>> set)
+std::ostream& operator<<(std::ostream& s, const std::vector<ListInstance> set)
 {
     s << std::endl << "{" << std::endl;
     std::transform(set.begin(), set.end(), std::experimental::make_ostream_joiner(s, ", \n"), [](const auto& map) {
@@ -58,7 +58,7 @@
     {
         dataPath_ listPath;
         listPath.m_scope = Scope::Absolute;
-        std::vector<std::map<std::string, leaf_data_>> expected;
+        std::vector<ListInstance> expected;
 
         SECTION("example-schema:person")
         {
diff --git a/tests/leaf_editing.cpp b/tests/leaf_editing.cpp
index 6da7868..ca5c8d6 100644
--- a/tests/leaf_editing.cpp
+++ b/tests/leaf_editing.cpp
@@ -125,7 +125,7 @@
         SECTION("set mod:list[number=1]/leafInList \"another_data\"")
         {
             input = "set mod:list[number=1]/leafInList \"another_data\"";
-            auto keys = std::map<std::string, leaf_data_>{
+            auto keys = ListInstance {
                 {"number", int32_t{1}}};
             expected.m_path.m_nodes.push_back(dataNode_{module_{"mod"}, listElement_("list", keys)});
             expected.m_path.m_nodes.push_back(dataNode_{leaf_("leafInList")});
diff --git a/tests/list_manipulation.cpp b/tests/list_manipulation.cpp
index d2ad5f9..35cd019 100644
--- a/tests/list_manipulation.cpp
+++ b/tests/list_manipulation.cpp
@@ -36,7 +36,7 @@
         SECTION("mod:list[number=3]")
         {
             input = "mod:list[number=3]";
-            auto keys = std::map<std::string, leaf_data_>{
+            auto keys = ListInstance {
                 {"number", int32_t{3}}};
             expectedPath.m_nodes.push_back(dataNode_{module_{"mod"}, listElement_("list", keys)});
         }
@@ -44,10 +44,10 @@
         SECTION("mod:company[department=other:engineering]/inventory[id=1337]")
         {
             input = "mod:company[department=other:engineering]/inventory[id=1337]";
-            auto keys = std::map<std::string, leaf_data_>{
+            auto keys = ListInstance {
                 {"department", identityRef_{"other", "engineering"}}};
             expectedPath.m_nodes.push_back(dataNode_{module_{"mod"}, listElement_("company", keys)});
-            keys = std::map<std::string, leaf_data_>{
+            keys = ListInstance {
                 {"id", int32_t{1337}}};
             expectedPath.m_nodes.push_back(dataNode_{listElement_("inventory", keys)});
         }
diff --git a/tests/ls.cpp b/tests/ls.cpp
index 6d70414..83b2d8d 100644
--- a/tests/ls.cpp
+++ b/tests/ls.cpp
@@ -166,7 +166,7 @@
             SECTION("ls example:list[number=342]/contInList")
             {
                 input = "ls example:list[number=342]/contInList";
-                auto keys = std::map<std::string, leaf_data_>{
+                auto keys = ListInstance {
                     {"number", int32_t{342}}};
                 expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, listElement_{"list", keys}),
                                                                 dataNode_(container_{"contInList"})}};
@@ -189,7 +189,7 @@
             SECTION("ls example:list[number=343]/..")
             {
                 input = "ls example:list[number=343]/..";
-                auto keys = std::map<std::string, leaf_data_>{
+                auto keys = ListInstance {
                     {"number", int32_t{343}}};
                 expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, listElement_{"list", keys}), dataNode_{nodeup_{}}}};
             }
diff --git a/tests/presence_containers.cpp b/tests/presence_containers.cpp
index f248597..e009c41 100644
--- a/tests/presence_containers.cpp
+++ b/tests/presence_containers.cpp
@@ -53,7 +53,7 @@
         SECTION("mod:list[quote='lol']/contInList")
         {
             input = "mod:list[quote='lol']/contInList";
-            auto keys = std::map<std::string, leaf_data_>{
+            auto keys = ListInstance {
                 {"quote", std::string{"lol"}}};
             expectedPath.m_nodes = {{{module_{"mod"}}, listElement_("list", keys)}, {container_("contInList")}};
         }
@@ -61,7 +61,7 @@
         SECTION("mod:list[quote='double\"quote']/contInList")
         {
             input = "mod:list[quote='double\"quote']/contInList";
-            auto keys = std::map<std::string, leaf_data_>{
+            auto keys = ListInstance {
                 {"quote", std::string{"double\"quote"}}};
             expectedPath.m_nodes = {{{module_{"mod"}}, listElement_("list", keys)}, {container_("contInList")}};
         }
@@ -69,7 +69,7 @@
         SECTION("mod:list[quote=\"single'quote\"]/contInList")
         {
             input = "mod:list[quote=\"single'quote\"]/contInList";
-            auto keys = std::map<std::string, leaf_data_>{
+            auto keys = ListInstance {
                 {"quote", std::string{"single'quote"}}};
             expectedPath.m_nodes = {{{module_{"mod"}}, listElement_("list", keys)}, {container_("contInList")}};
         }