Restructure some unit tests.