Updated test to also use ref