Modify mongo duplicate key test to work on server