Add testcases for code coverage and supporting code.