Adds test for constructor function