Refactor test to use loop