Adds test for toKey puts tests in class