Added a unit test for the code examples.