'Prints generated \'golden\' output to the stdout.'

def Generate(self):

    sample_data = {}
    tests = self._GroupRegressionTestsByHandler()
    for (handler, test_classes) in tests.items():
        for test_class in sorted(test_classes, key=(lambda cls: cls.__name__)):
            if (flags.FLAGS.tests and (test_class.__name__ not in flags.FLAGS.tests)):
                continue
            if (getattr(test_class, 'connection_type', '') != self.connection_type):
                continue
            test_class.setUpClass()
            loaded = self.loader.loadTestsFromTestCase(test_class)
            for t in loaded:
                try:
                    t.setUp()
                    t.Run()
                    sample_data.setdefault(handler.__name__, []).extend(t.checks)
                finally:
                    try:
                        t.tearDown()
                    except Exception as e:
                        logging.exception(e)
    json_sample_data = json.dumps(sample_data, indent=2, sort_keys=True, separators=(',', ':    '))
    print json_sample_data
