Source:
private void startIfRequired() { if (jettyServer != null) { return; } try { application = newApplication(); final Bootstrap<C> bootstrap = new Bootstrap<C>(application) { @Override public void run(C configuration, Environment environment) throws Exception { environment.lifecycle().addServerLifecycleListener(new ServerLifecycleListener() { @Override public void serverStarted(Server server) { jettyServer = server; } }); DropwizardTestSupport.this.configuration = configuration; DropwizardTestSupport.this.environment = environment; super.run(configuration, environment); for (ServiceListener<C> listener : listeners) { try { listener.onRun(configuration, environment, DropwizardTestSupport.this); } catch (Exception ex) { throw new RuntimeException("Error running app rule start listener", ex); } } } }; if (explicitConfig) { bootstrap.setConfigurationFactoryFactory(new ConfigurationFactoryFactory<C>() { @Override public ConfigurationFactory<C> create(Class<C> klass, Validator validator, ObjectMapper objectMapper, String propertyPrefix) { return new POJOConfigurationFactory<C>(configuration); } }); } else if (customPropertyPrefix.isPresent()) { bootstrap.setConfigurationFactoryFactory(new ConfigurationFactoryFactory<C>() { @Override public ConfigurationFactory<C> create(Class<C> klass, Validator validator, ObjectMapper objectMapper, String propertyPrefix) { return new ConfigurationFactory<>(klass, validator, objectMapper, customPropertyPrefix.get()); } }); } application.initialize(bootstrap); final ServerCommand<C> command = new ServerCommand<>(application); ImmutableMap.Builder<String, Object> file = ImmutableMap.builder(); if (!Strings.isNullOrEmpty(configPath)) { file.put("file", configPath); } final Namespace namespace = new Namespace(file.build()); command.run(bootstrap, namespace); } catch (Exception e) { throw propagate(e); } }

Target:
private void startIfRequired() { if (jettyServer != null) { return; } try { application = newApplication(); final Bootstrap<C> bootstrap = new Bootstrap<C>(application) { @Override public void run(C configuration, Environment environment) throws Exception { environment.lifecycle().addServerLifecycleListener(new ServerLifecycleListener() { @Override public void serverStarted(Server server) { jettyServer = server; } }); DropwizardTestSupport.this.configuration = configuration; DropwizardTestSupport.this.environment = environment; super.run(configuration, environment); for (ServiceListener<C> listener : listeners) { try { listener.onRun(configuration, environment, DropwizardTestSupport.this); } catch (Exception ex) { throw new RuntimeException("Error running app rule start listener", ex); } } } }; if (explicitConfig) { bootstrap.setConfigurationFactoryFactory(new ConfigurationFactoryFactory<C>() { @Override public ConfigurationFactory<C> create(Class<C> klass, Validator validator, ObjectMapper objectMapper, String propertyPrefix) { return new POJOConfigurationFactory<>(configuration); } }); } else if (customPropertyPrefix.isPresent()) { bootstrap.setConfigurationFactoryFactory(new ConfigurationFactoryFactory<C>() { @Override public ConfigurationFactory<C> create(Class<C> klass, Validator validator, ObjectMapper objectMapper, String propertyPrefix) { return new ConfigurationFactory<>(klass, validator, objectMapper, customPropertyPrefix.get()); } }); } application.initialize(bootstrap); final ServerCommand<C> command = new ServerCommand<>(application); ImmutableMap.Builder<String, Object> file = ImmutableMap.builder(); if (!Strings.isNullOrEmpty(configPath)) { file.put("file", configPath); } final Namespace namespace = new Namespace(file.build()); command.run(bootstrap, namespace); } catch (Exception e) { throw propagate(e); } }