package com.box.sdk;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

final class TestConfig {
    private static Properties configProperties = null;
    private static String accessToken = null;
    private static String refreshToken = null;
    private static String clientID = null;
    private static String clientSecret = null;
    private static String collaborator = null;

    private TestConfig() { }

    public static String getAccessToken() {
        if (accessToken == null || accessToken.equals("")) {
            accessToken = getProperty("accessToken");
        }

        return accessToken;
    }

    public static void setAccessToken(String accessToken) {
        TestConfig.accessToken = accessToken;
    }

    public static String getRefreshToken() {
        if (refreshToken == null || refreshToken.equals("")) {
            refreshToken = getProperty("refreshToken");
        }

        return refreshToken;
    }

    public static void setRefreshToken(String refreshToken) {
        TestConfig.refreshToken = refreshToken;
    }

    public static String getClientID() {
        if (clientID == null || clientID.equals("")) {
            clientID = getProperty("clientID");
        }

        return clientID;
    }

    public static String getClientSecret() {
        if (clientSecret == null || clientSecret.equals("")) {
            clientSecret = getProperty("clientSecret");
        }

        return clientSecret;
    }

    public static String getCollaborator() {
        if (collaborator == null || collaborator.equals("")) {
            collaborator = getProperty("collaborator");
        }

        return collaborator;
    }

    private static String getProperty(String name) {
        Properties configProperties = loadProperties();
        String value = configProperties.getProperty(name);
        if (value.equals("")) {
            throw new IllegalStateException("The " + name + " property wasn't set in "
                + "src/test/config/config.properties.");
        }

        return value;
    }

    private static Properties loadProperties() {
        if (configProperties != null) {
            return configProperties;
        }

        configProperties = new Properties();
        InputStream input = null;

        try {
            input = new FileInputStream("src/test/config/config.properties");
            configProperties.load(input);
            input.close();
        } catch (IOException e) {
            throw new IllegalStateException("Couldn't open \"src/test/config/config.properties\".", e);
        }

        return configProperties;
    }
}

@@ -131,16 +131,156 @@
 perties;
+%0Aimport java.util.logging.ConsoleHandler;%0Aimport java.util.logging.Handler;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;
 %0A%0Afinal 
@@ -610,24 +610,654 @@
 nfig() %7B %7D%0A%0A
+    public static void setLogLevel(String levelString) %7B%0A        Level level = Level.parse(levelString);%0A        Logger logger = Logger.getLogger(%22com.box.sdk%22);%0A        logger.setLevel(level);%0A%0A        boolean hasConsoleHandler = false;%0A        for (Handler handler : logger.getHandlers()) %7B%0A            handler.setLevel(level);%0A            if (handler instanceof ConsoleHandler) %7B%0A                hasConsoleHandler = true;%0A            %7D%0A        %7D%0A%0A        if (!hasConsoleHandler) %7B%0A            Handler handler = new ConsoleHandler();%0A            handler.setLevel(level);%0A            logger.addHandler(handler);%0A        %7D%0A    %7D%0A%0A
     public s

Add a TestConfig method for setting the log level