Added test and implementation for error raising when key is missing
changed method name
wrote a test that fails on key exists
Fixed the tests