Add test coverage for Line->getPenalty