Bidswitch filter test : remove duplicate code