Extract base class to test all the tables

Change-Id: I6bb59a1563f50fd5dceefe2072ffb6a980a3fdf7