Adding new tests for new methods onlyKey and hasField.