If you're getting random lockups after installing the RAM, if those lockups go away after you remove the RAM, and if the RAM fails tests, I'd say that's a pretty open-and-shut case.
You could try Apple's hardware diagnostic disc if you want a second opinion, but I'd probably just go and get the RAM replaced under warranty. I'd try it with each RAM module individually first, though, to see which one is bad - if one of them is okay, there's no point in replacing a RAM module that works.