(#16498) Added unit test for loadyaml function.

As stated on the issue #16498, it would be great to have unit tests
for all the functions.

Function loadyaml was missing a unit test. This commit added the
unit test to loadyaml function.
Merge pull request #185 from lmello/refactor_16498

(#16498) Added unit test for loadyaml function.