Refactor topic viewlet tests.