Adding unit tests for the TableItem

Fixed bug turned up by the tests.