refactored test to be a parameterized unit test