Merge working version of unit tests from 0.20.0 release branch.