Minecraft wiki entry for testforblock, associated text: To test if the block at (0,64,0) is any type of wool:
testforblock 0 64 0 wool
testforblock 0 64 0 wool -1
To test if the block at (0,64,0) is orange wool:
testforblock 0 64 0 wool 1
To test if the block below is a jukebox:
testforblock ~ ~-1 ~ jukebox -1