refactored tests to use a builder pattern