NBC Sports Group interview question

Write a unit test for that function.