Testfor items in hopper 1.12.2!

Solution 1:

That error message is really unintuitive, because what it should tell you is that the NBT has a syntax error. Items is an array tag, so you need []:

/testforblock ~ ~-1 ~ minecraft:hopper -1 {Items:[{Slot:0b,id:"minecraft:wool",Count:1b,Damage:0s}]}