Added test for duplicate key