def test_generate_specs(self):
        multiple_spec = MultipleSpecEntity({
            'problem_names':
            self.problem_names,
            'dim_xs':
            self.dim_xs,
            'choose_noises':
            self.choose_noises,
            'bounds_domain_xs': [[self.bound]],
            'number_points_each_dimensions':
            self.number_points_each_dimensions,
            'method_optimizations':
            self.method_optimizations,
            'training_names': [self.training_name],
            'bounds_domains':
            self.bounds_domain_xs,
            'type_boundss': [[0]],
            'n_trainings': [10],
            'type_kernels': [self.type_kernel],
            'dimensionss': [self.dimensions],
        })

        specs = SpecService.generate_specs(1, multiple_spec)
        assert len(specs) == 1
        for s in specs:
            s.validate()
                        default=5)
    parser.add_argument('--output_file',
                        type=str,
                        help='output file',
                        default='output.json')

    args = parser.parse_args()

    output_file = args.output_file
    n_spec = int(args.spec)

    output_file = 'spec_%d' % n_spec + '_' + output_file

    multiple_spec = MultipleSpecEntity.from_json(args.multiple_spec)

    spec = SpecService.generate_specs(n_spec, multiple_spec)

    result = BGO.run_spec(spec)

    with open(args.output_file, 'w') as f:
        ujson.dump(result, f)

    # results = []
    # for spec in specs:
    #     result = {
    #         'problem_name': spec.problem_name,
    #         'method_optimization': spec.method_optimization,
    #         'result': BGO.run_spec(spec)
    #     }
    #     results.append(result)