Here we could make use of the FilterFactory . People especially like me copy and paste the code without reading the whole stuff when testing  a component ;) .