Completed example. Also added test project and unit tests using Moq testing framework.