"A piece of cake" is an idiom (meaning "very easy"). A non-example of an idiom is a purely literal phrase with no figurative meaning—its meaning is exactly the sum of its words.
Examples:
These convey only their literal, compositional meaning—no metaphor, cultural reference, or implied sense beyond the words themselves.