Add test to reproduce missing TableName function

TableName does not work as expected