OpenApiBundle implements ConfiguredBundle<T> { @Override public void initialize(Bootstrap<?> bootstrap) { bootstrap.addBundle(new ViewBundle<Configuration>()); ModelConverters.getInstance().addConverter(new ModelResolver(bootstrap.getObjectMapper())); }  @Override void initialize(Bootstrap<?> bootstrap); @Override void run(T configuration, Environment environment); abstract OpenApiConfiguration getOpenApiConfiguration(T configuration);  }
@Test @SuppressWarnings("unchecked") void testInitialize() { Bootstrap<ThunderConfiguration> bootstrap = mock(Bootstrap.class); when(bootstrap.getObjectMapper()).thenReturn(Jackson.newObjectMapper()); OpenApiBundle<ThunderConfiguration> bundle = new OpenApiBundle<>() { @Override public OpenApiConfiguration getOpenApiConfiguration(ThunderConfiguration configuration) { return new OpenApiConfiguration(); } }; bundle.initialize(bootstrap); verify(bootstrap).addBundle(any(ViewBundle.class)); }