@VisibleForTesting
static final String getSpecJson(Application app) {
// Now, we call configure, which returns application specification.
DefaultAppConfigurer configurer = new DefaultAppConfigurer(app);
app.configure(configurer, new ApplicationContext());
ApplicationSpecification specification = configurer.createApplicationSpec();
// Convert the specification to JSON.
// We write the Application specification to output file in JSON format.
// TODO: The SchemaGenerator should be injected