added TraitFilterUtil and Junit test for it