Refactor tests to reduce duplicate strings