add unit test for registerViewHelper