diff --git a/tests/utests/basic/test_plugins.c b/tests/utests/basic/test_plugins.c
new file mode 100644
index 0000000..015d4b0
--- /dev/null
+++ b/tests/utests/basic/test_plugins.c
@@ -0,0 +1,95 @@
+/*
+ * @file set.c
+ * @author: Radek Krejci <rkrejci@cesnet.cz>
+ * @brief unit tests for functions from set.c
+ *
+ * Copyright (c) 2018 CESNET, z.s.p.o.
+ *
+ * This source code is licensed under BSD 3-Clause License (the "License").
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/BSD-3-Clause
+ */
+#define _UTEST_MAIN_
+#include "utests.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "config.h"
+#include "plugins.h"
+#include "plugins_internal.h"
+
+const char *simple = "module libyang-plugins-simple {"
+        "  namespace urn:libyang:tests:plugins:simple;"
+        "  prefix s;"
+        "  typedef note { type string; }"
+        "  extension hint { argument value; }"
+        "  leaf test {"
+        "    type s:note {length 255;}"
+        "    s:hint \"some hint here\";"
+        "  }"
+        "}";
+
+static void
+test_add_invalid(void **state)
+{
+    assert_int_equal(LY_ESYS, lyplg_add(TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX));
+
+#ifdef __APPLE__
+    CHECK_LOG("Loading \""TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX "\" as a plugin failed "
+            "(dlopen("TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX ", 2): image not found).", NULL);
+#else
+    CHECK_LOG("Loading \""TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX "\" as a plugin failed "
+            "("TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX ": cannot open shared object file: "
+            "No such file or directory).", NULL);
+#endif
+
+    assert_int_equal(LY_EINVAL, lyplg_add(TESTS_BIN "/plugins/plugin_invalid" LYPLG_SUFFIX));
+#ifndef __APPLE__
+    /* OS X prints address of the symbol being searched and cmocka doesn't support wildcards in string checking assert */
+    CHECK_LOG("Processing user type plugin \""TESTS_BIN "/plugins/plugin_invalid"LYPLG_SUFFIX "\" failed, "
+            "missing type plugins information ("TESTS_BIN "/plugins/plugin_invalid"LYPLG_SUFFIX ": "
+            "undefined symbol: plugins_types__).", NULL);
+#endif
+}
+
+static void
+test_add_simple(void **state)
+{
+    const struct lys_module *mod;
+    struct lysc_node_leaf *leaf;
+    struct lyplg_ext *plugin_e;
+    struct lyplg_type *plugin_t;
+
+    assert_int_equal(LY_SUCCESS, lyplg_add(TESTS_BIN "/plugins/plugin_simple" LYPLG_SUFFIX));
+
+    UTEST_ADD_MODULE(simple, LYS_IN_YANG, NULL, &mod);
+
+    leaf = (struct lysc_node_leaf *)mod->compiled->data;
+    assert_int_equal(LYS_LEAF, leaf->nodetype);
+
+    assert_non_null(plugin_t = lyplg_find(LYPLG_TYPE, "libyang-plugins-simple", NULL, "note"));
+    assert_string_equal("libyang 2 - simple test, version 1", plugin_t->id);
+    assert_ptr_equal(leaf->type->plugin, plugin_t);
+
+    assert_int_equal(1, LY_ARRAY_COUNT(leaf->exts));
+    assert_non_null(plugin_e = lyplg_find(LYPLG_EXTENSION, "libyang-plugins-simple", NULL, "hint"));
+    assert_string_equal("libyang 2 - simple test, version 1", plugin_e->id);
+    assert_ptr_equal(leaf->exts[0].def->plugin, plugin_e);
+
+    /* the second loading of the same plugin - still success */
+    assert_int_equal(LY_SUCCESS, lyplg_add(TESTS_BIN "/plugins/plugin_simple" LYPLG_SUFFIX));
+}
+
+int
+main(void)
+{
+    const struct CMUnitTest tests[] = {
+        UTEST(test_add_invalid),
+        UTEST(test_add_simple),
+    };
+
+    return cmocka_run_group_tests(tests, NULL, NULL);
+}
