Add test for YAMLPrinter

Added a unittest for YAMLPrinter