add a failing test for the annoying undefined index problem and throw an accurate model exception