also TO THROW ONE'S CAP OVER THE WINDMILL
CLICK HERE FOR KEY TO SOURCES
from a passage in the novel Don Quixote where the eponymous character throws his cap over a windmill that he has mistaken for a giant, as a challenge.
From: The Courtier of the Days of Charles II, with Other Tales
By Mrs. Gore (Catherine Grace Frances), 1839