simplification of lambda declaration in test