Refactor view test cases #2.