How can I test a mega before I try to use it?
Well I would think the if you can upload a sketch first that would tell you that the board is pretty much functional. That would leave only testing for bad I/O pins.
Write a sketch that blinks a output at one second to all pins and then attach a simple led>1k ohm resistor> cathode end of led to ground, anode end of LED moved to each pin, one at a time, to see if it blinks then move on to your next pin. The setup function would have to set-up all the pins to output mode and the loop function would contain the blink code to generate a pulsing output to every output pin.
Lefty