Refactored tests to use declarative syntax.