Test branch function