Added context unit tests.

Progress towards test coverage. Includes some running repairs to other
unit tests.