If you changed the battery, and the new battery is assumed good, and the remote won't operate the locks, then the remote is not the right one for your Jeep. You have three options, now. 1) See if you can get together with the guy that bought the seller's other Jeep and swap fobs, or 2) Get your RKE unit programmed to match your "non-working" remote (see link above for programming instructions at thejeep.com), or 3) disable the factory RKE unit and install an aftermarket unit that comes with two fobs.
The RKE remotes either work or they don't. There really isn't any testing that can be done. If you press the buttons and the red light on the remote blinks, it's good. If the light blinks and the locks don't operate, then your RKE isn't programmed to accept that remote.
It isn't actually the remotes that are programmed. It is the RKE unit in the car that is programmed to accept the remote. Each RKE unit can be programmed to accept up to 4 remotes. After that, you have to replace the RKE unit.