package org.pac4j.dropwizard;

import org.pac4j.core.config.Config;
import org.pac4j.core.config.ConfigSingleton;
import org.pac4j.http.client.direct.DirectBasicAuthClient;
import org.pac4j.http.credentials.authenticator.test.SimpleTestUsernamePasswordAuthenticator;

import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;

public class TestApplication extends Application<TestConfiguration> {
    @Override
    public void initialize(Bootstrap<TestConfiguration> bootstrap) {
        final Pac4jBundle<TestConfiguration> bundle = new Pac4jBundle<TestConfiguration>() {
            @Override
            public Pac4jFactory getPac4jFactory(TestConfiguration configuration) {
                return configuration.pac4jFactory;
            }
        };
        bootstrap.addBundle(bundle);
    }

    @Override
    public void run(TestConfiguration config, Environment env) throws Exception {
        final Config pac4j = new Config(
            new DirectBasicAuthClient(
                new SimpleTestUsernamePasswordAuthenticator()
            )
        );
        ConfigSingleton.setConfig(pac4j);
        env.jersey().register(new DogsResource());
    }
}

@@ -47,28 +47,29 @@
 j.core.c
-onfig.Config
+lient.Clients
 ;%0Aimport
@@ -954,53 +954,59 @@
     
-final Config pac4j = new Config(%0A            
+ConfigSingleton.getConfig().setClients(new Clients(
 new 
@@ -1102,64 +1102,10 @@
     
-    )%0A        );%0A        ConfigSingleton.setConfig(pac4j
+))
 );%0A 

Fix tests