Added sample code and corresponding unit tests.