What type of figurative language is this?

That test was a piece of cake.
a. idiom
b. metaphor

a. idiom