Testing Code for constructing view