Testing a code in iTunes is a bit tricky but easy nonetheless. You will require to download iTunes if you haven't done so yet and have an active iTunes account.
Go to iTunes Store...
Login into your account...
Enter your code and click Redeem...
Once you click Redeem one of the following will happen:
Message "This code has already been redeemed"
- Self explanatory, code has been used or redeemed.
Message "The code entered is not valid"
- Code enter is incorrect, mistyped or not valid in iTunes.
Message "You must insert your Digital Copy DVD into your computer in order to redeem this code.
- The iTunes code entered can only be redeemed with the Digital Copy Disc included in the package or the XML workaround.
The code will be valid as in the following picture...