@Test @SuppressWarnings("unchecked") void testInitialize() { var captor = ArgumentCaptor.forClass(OpenApiBundle.class); var bootstrap = mock(Bootstrap.class); application.initialize(bootstrap); verify(bootstrap, times(1)).addBundle(captor.capture()); OpenApiConfiguration openApiConfiguration = captor.getValue().getOpenApiConfiguration(CONFIG); assertTrue(openApiConfiguration.isEnabled()); }
@Override public void initialize(Bootstrap<ThunderConfiguration> bootstrap) { bootstrap.addBundle(new OpenApiBundle<ThunderConfiguration>() { @Override public OpenApiConfiguration getOpenApiConfiguration(ThunderConfiguration configuration) { return configuration.getOpenApiConfiguration(); } }); }
ThunderApplication extends Application<ThunderConfiguration> { @Override public void initialize(Bootstrap<ThunderConfiguration> bootstrap) { bootstrap.addBundle(new OpenApiBundle<ThunderConfiguration>() { @Override public OpenApiConfiguration getOpenApiConfiguration(ThunderConfiguration configuration) { return configuration.getOpenApiConfiguration(); } }); } }
ThunderApplication extends Application<ThunderConfiguration> { @Override public void initialize(Bootstrap<ThunderConfiguration> bootstrap) { bootstrap.addBundle(new OpenApiBundle<ThunderConfiguration>() { @Override public OpenApiConfiguration getOpenApiConfiguration(ThunderConfiguration configuration) { return configuration.getOpenApiConfiguration(); } }); }  }
ThunderApplication extends Application<ThunderConfiguration> { @Override public void initialize(Bootstrap<ThunderConfiguration> bootstrap) { bootstrap.addBundle(new OpenApiBundle<ThunderConfiguration>() { @Override public OpenApiConfiguration getOpenApiConfiguration(ThunderConfiguration configuration) { return configuration.getOpenApiConfiguration(); } }); }  static void main(String[] args); @Override void initialize(Bootstrap<ThunderConfiguration> bootstrap); @Override void run(ThunderConfiguration config, Environment env); }
ThunderApplication extends Application<ThunderConfiguration> { @Override public void initialize(Bootstrap<ThunderConfiguration> bootstrap) { bootstrap.addBundle(new OpenApiBundle<ThunderConfiguration>() { @Override public OpenApiConfiguration getOpenApiConfiguration(ThunderConfiguration configuration) { return configuration.getOpenApiConfiguration(); } }); }  static void main(String[] args); @Override void initialize(Bootstrap<ThunderConfiguration> bootstrap); @Override void run(ThunderConfiguration config, Environment env);  }