I have been having trouble with this command. I am trying to detect wool with a certain color but when ever I try to detect the wool it says

    Failed to execute '0 /summon ArmorStand ~ ~ ~

I have done a lot of research to fix this and I cant find a way to make it work.This is the command I used.

    /execute @e[type=ArmorStand,name=test] ~ ~ ~ detect minecraft:wool 1 0 /summon ArmorStand ~ ~ ~

I also used

    /execute @e[type=ArmorStand,name=test] ~ ~ ~ detect wool 1 0 /summon ArmorStand ~ ~ ~