Enhance unit test framework and add tests for centering views