@Override
    public Table getTable(TableName tableName) throws IOException {
      Table table = Mockito.mock(Table.class);
      Mockito.when(table.getName()).thenReturn(tableName);
      return table;
    }
Connection to use above in Test.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableInputFormatBase.java