Adds test function.