Test of optimal sampling by foraging great tits