Test method passing in lambda as block