[units] Convert examples to tests.