Refactored: Omitted the variable type in the lambda expressions in the tests.