add tests for setKey()