Removing useless cast
Adding a test for getKeys