Refactoring tests to use lambda expressions, adding two new tests