code: protected void validate(List<TableInfo> tableInfos)
      {
          db = mongo.getDB(databaseName);
          if (db == null)
          {
              logger.error("Database " + databaseName + "does not exist");
              throw new SchemaGenerationException("database " + databaseName + "does not exist", "mongoDb", databaseName);
          }
          else
          {
              for (TableInfo tableInfo : tableInfos)
              {
                  if (tableInfo.getLobColumnInfo().isEmpty())
                  {
                      if (!db.collectionExists(tableInfo.getTableName()))
                      {
                          logger.error("Collection " + tableInfo.getTableName() + "does not exist in db " + db.getName());
                          throw new SchemaGenerationException("Collection " + tableInfo.getTableName()
                                  + " does not exist in db " + db.getName(), "mongoDb", databaseName,
                                  tableInfo.getTableName());
                      }
                  }
                  else
                  {
                      checkMultipleLobs(tableInfo);
                      if (!db.collectionExists(tableInfo.getTableName() + MongoDBUtils.FILES))
                      {
                          logger.error("Collection " + tableInfo.getTableName() + MongoDBUtils.FILES
                                  + "does not exist in db " + db.getName());
                          throw new SchemaGenerationException("Collection " + tableInfo.getTableName()
                                  + " does not exist in db " + db.getName(), "mongoDb", databaseName,
                                  tableInfo.getTableName());
                      }
                      if (!db.collectionExists(tableInfo.getTableName() + MongoDBUtils.CHUNKS))
                      {
                          logger.error("Collection " + tableInfo.getTableName() + MongoDBUtils.CHUNKS
                                  + "does not exist in db " + db.getName());
                          throw new SchemaGenerationException("Collection " + tableInfo.getTableName()
                                  + " does not exist in db " + db.getName(), "mongoDb", databaseName,
                                  tableInfo.getTableName());
                      }
  
                  }
              }
          }
      }
docs: validate method validate schema and table for the list of tableInfos.
  
  @param tableInfos
  list of TableInfos.