Merge commit '7798d36a4661ac8c88eb47cf0c66d3eeafb2f7a8' * commit '7798d36a4661ac8c88eb47cf0c66d3eeafb2f7a8': Add unit tests.