// Path: src/test/java/co/omise/ConfigTest.java
// public class ConfigTest extends OmiseTest {
//     static final String JAVA_VERSION = System.getProperty("java.version");
//     static final String PKG_VERSION = Client.class.getPackage().getImplementationVersion();
// 
//     static final String API_VERSION = "new-shiny-version";
//     static final String PKEY = "pkey_test_123";
//     static final String SKEY = "skey_test_123";
// 
//     @Test
//     public void testCtor() {
//         Config config = config();
//         assertEquals(API_VERSION, config.apiVersion());
//         assertEquals(PKEY, config.publicKey());
//         assertEquals(SKEY, config.secretKey());
//     }
// 
//     @Test
//     public void testUserAgent() {
//         StringBuilder builder = new StringBuilder();
//         builder.append("OmiseJava/");
//         builder.append(PKG_VERSION);
//         builder.append(" OmiseAPI/");
//         builder.append(API_VERSION);
//         builder.append(" Java/");
//         builder.append(JAVA_VERSION);
// 
//         assertEquals(builder.toString(), config().userAgent());
//     }
// 
//     static Config config() {
//         return new Config(API_VERSION, PKEY, SKEY);
//     }
// }


import okhttp3.Credentials;
import okhttp3.Request;
import org.junit.Test;
import static co.omise.ConfigTest.*;
                .build());

        assertEquals(API_VERSION, req.header("Omise-Version"));
    }

    @Test
    public void testVaultRequest() {
        Request req = configure(new Request.Builder()
                .url("https://vault.omise.co/tokens")
                .build());

        String authorization = req.header("Authorization");
        assertEquals(authorization, Credentials.basic(PKEY, "x"));
    }

    @Test
    public void testApiRequest() {
        Request req = configure(new Request.Builder()
                .url("https://api.omise.co/charges")
                .build());

        String authorization = req.header("Authorization");
        assertEquals(authorization, Credentials.basic(SKEY, "x"));
    }

    private Request configure(Request req) {
        return Configurer.configure(config(), req);
    }

    private Config config() {
// Path: src/test/java/co/omise/ConfigTest.java
// public class ConfigTest extends OmiseTest {
//     static final String JAVA_VERSION = System.getProperty("java.version");
//     static final String PKG_VERSION = Client.class.getPackage().getImplementationVersion();
// 
//     static final String API_VERSION = "new-shiny-version";
//     static final String PKEY = "pkey_test_123";
//     static final String SKEY = "skey_test_123";
// 
//     @Test
//     public void testCtor() {
//         Config config = config();
//         assertEquals(API_VERSION, config.apiVersion());
//         assertEquals(PKEY, config.publicKey());
//         assertEquals(SKEY, config.secretKey());
//     }
// 
//     @Test
//     public void testUserAgent() {
//         StringBuilder builder = new StringBuilder();
//         builder.append("OmiseJava/");
//         builder.append(PKG_VERSION);
//         builder.append(" OmiseAPI/");
//         builder.append(API_VERSION);
//         builder.append(" Java/");
//         builder.append(JAVA_VERSION);
// 
//         assertEquals(builder.toString(), config().userAgent());
//     }
// 
//     static Config config() {
//         return new Config(API_VERSION, PKEY, SKEY);
//     }
// }


// Path: src/test/java/co/omise/ConfigurerTest.java
import okhttp3.Credentials;
import okhttp3.Request;
import org.junit.Test;
import static co.omise.ConfigTest.*;

                .build());

        assertEquals(API_VERSION, req.header("Omise-Version"));
    }

    @Test
    public void testVaultRequest() {
        Request req = configure(new Request.Builder()
                .url("https://vault.omise.co/tokens")
                .build());

        String authorization = req.header("Authorization");
        assertEquals(authorization, Credentials.basic(PKEY, "x"));
    }

    @Test
    public void testApiRequest() {
        Request req = configure(new Request.Builder()
                .url("https://api.omise.co/charges")
                .build());

        String authorization = req.header("Authorization");
        assertEquals(authorization, Credentials.basic(SKEY, "x"));
    }

    private Request configure(Request req) {
        return Configurer.configure(config(), req);
    }

    private Config config() {
        return ConfigTest.config();