// Path: runAs-common/src/main/java/jetbrains/buildServer/runAs/common/LoggingLevel.java
// public enum LoggingLevel {
//   Off("off", "Off"),
//   Errors("errors", "Errors"),
//   Normal("normal", "Normal"),
//   Debug("debug", "Debug");
// 
//   private final String myValue;
//   private final String myDescription;
// 
//   private LoggingLevel(String value, final String description) {
//     myValue = value;
//     myDescription = description;
//   }
// 
//   public String getValue() {
//     return myValue;
//   }
// 
//   public String getDescription() {
//     return myDescription;
//   }
// 
//   public static LoggingLevel tryParse(String value) {
//     for (LoggingLevel v : values()) {
//       if (v.getValue().equals(value)) return v;
//     }
// 
//     return Off;
//   }
// }
// 
// Path: runAs-common/src/main/java/jetbrains/buildServer/runAs/common/WindowsIntegrityLevel.java
// public enum WindowsIntegrityLevel {
//   Auto("auto", "Default"),
//   Untrusted("untrusted", "Untrusted"),
//   Low("low", "Low"),
//   Medium("medium", "Medium"),
//   MediumPlus("medium_plus", "Medium Plus"),
//   High("high", "High");
// 
//   private final String myValue;
//   private final String myDescription;
// 
//   private WindowsIntegrityLevel(String value, final String description) {
//     myValue = value;
//     myDescription = description;
//   }
// 
//   public String getValue() {
//     return myValue;
//   }
// 
//   public String getDescription() {
//     return myDescription;
//   }
// 
//   public static WindowsIntegrityLevel tryParse(String value) {
//     for (WindowsIntegrityLevel v : values()) {
//       if (v.getValue().equals(value)) return v;
//     }
// 
//     return Auto;
//   }
// }
// 
// Path: runAs-common/src/main/java/jetbrains/buildServer/runAs/common/Constants.java
// public static final String RUN_AS_ACL = "teamcity.runAs.acl";
// 
// Path: runAs-common/src/main/java/jetbrains/buildServer/runAs/common/Constants.java
// public static final String RUN_AS_ACL_DEFAULTS_ENABLED = "teamcity.runAs.acl.defaults.enabled";


import org.testng.annotations.Test;
import static jetbrains.buildServer.runAs.common.Constants.RUN_AS_ACL;
import static jetbrains.buildServer.runAs.common.Constants.RUN_AS_ACL_DEFAULTS_ENABLED;
import static org.assertj.core.api.BDDAssertions.then;
import java.io.File;
import java.io.IOException;
import java.util.*;
import jetbrains.buildServer.dotNet.buildRunner.agent.CommandLineArgument;
import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser;
import jetbrains.buildServer.runAs.common.LoggingLevel;
import jetbrains.buildServer.runAs.common.WindowsIntegrityLevel;
import jetbrains.buildServer.util.StringUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
    final File tools = new File("tools");
    final File plugins = new File("plugins");
    final File lib = new File("lib");
    final File config = new File("config");
    final File log = new File("log");
    final File checkout = new File("checkout");
    final File system = new File("system");
    final File agentTemp = new File("agentTemp");
    final File buildTemp = new File("buildTemp");
    final File globalTemp = new File("globalTemp");
    UserCredentials userCredentials = new UserCredentials(
      profile,
      username,
      "password78",
      WindowsIntegrityLevel.High,
      LoggingLevel.Debug,
      Arrays.asList(new CommandLineArgument("arg1", CommandLineArgument.Type.PARAMETER), new CommandLineArgument("arg2", CommandLineArgument.Type.PARAMETER)));

    myCtx.checking(new Expectations() {{
      configureExpectations();
    }

      void configureExpectations() {
        one(myAgentParametersService).tryGetConfigParameter(RUN_AS_ACL_DEFAULTS_ENABLED);
        will(returnValue(isDefaultsAclEnabledStr));

        allowing(myPathsService).getPath(WellKnownPaths.Work);
        will(returnValue(work));

        allowing(myPathsService).getPath(WellKnownPaths.Log);
// Path: runAs-common/src/main/java/jetbrains/buildServer/runAs/common/LoggingLevel.java
// public enum LoggingLevel {
//   Off("off", "Off"),
//   Errors("errors", "Errors"),
//   Normal("normal", "Normal"),
//   Debug("debug", "Debug");
// 
//   private final String myValue;
//   private final String myDescription;
// 
//   private LoggingLevel(String value, final String description) {
//     myValue = value;
//     myDescription = description;
//   }
// 
//   public String getValue() {
//     return myValue;
//   }
// 
//   public String getDescription() {
//     return myDescription;
//   }
// 
//   public static LoggingLevel tryParse(String value) {
//     for (LoggingLevel v : values()) {
//       if (v.getValue().equals(value)) return v;
//     }
// 
//     return Off;
//   }
// }
// 
// Path: runAs-common/src/main/java/jetbrains/buildServer/runAs/common/WindowsIntegrityLevel.java
// public enum WindowsIntegrityLevel {
//   Auto("auto", "Default"),
//   Untrusted("untrusted", "Untrusted"),
//   Low("low", "Low"),
//   Medium("medium", "Medium"),
//   MediumPlus("medium_plus", "Medium Plus"),
//   High("high", "High");
// 
//   private final String myValue;
//   private final String myDescription;
// 
//   private WindowsIntegrityLevel(String value, final String description) {
//     myValue = value;
//     myDescription = description;
//   }
// 
//   public String getValue() {
//     return myValue;
//   }
// 
//   public String getDescription() {
//     return myDescription;
//   }
// 
//   public static WindowsIntegrityLevel tryParse(String value) {
//     for (WindowsIntegrityLevel v : values()) {
//       if (v.getValue().equals(value)) return v;
//     }
// 
//     return Auto;
//   }
// }
// 
// Path: runAs-common/src/main/java/jetbrains/buildServer/runAs/common/Constants.java
// public static final String RUN_AS_ACL = "teamcity.runAs.acl";
// 
// Path: runAs-common/src/main/java/jetbrains/buildServer/runAs/common/Constants.java
// public static final String RUN_AS_ACL_DEFAULTS_ENABLED = "teamcity.runAs.acl.defaults.enabled";


// Path: runAs-agent/src/test/java/jetbrains/buildServer/runAs/agent/AccessControlListProviderTest.java
import org.testng.annotations.Test;
import static jetbrains.buildServer.runAs.common.Constants.RUN_AS_ACL;
import static jetbrains.buildServer.runAs.common.Constants.RUN_AS_ACL_DEFAULTS_ENABLED;
import static org.assertj.core.api.BDDAssertions.then;
import java.io.File;
import java.io.IOException;
import java.util.*;
import jetbrains.buildServer.dotNet.buildRunner.agent.CommandLineArgument;
import jetbrains.buildServer.dotNet.buildRunner.agent.TextParser;
import jetbrains.buildServer.runAs.common.LoggingLevel;
import jetbrains.buildServer.runAs.common.WindowsIntegrityLevel;
import jetbrains.buildServer.util.StringUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;

    final File tools = new File("tools");
    final File plugins = new File("plugins");
    final File lib = new File("lib");
    final File config = new File("config");
    final File log = new File("log");
    final File checkout = new File("checkout");
    final File system = new File("system");
    final File agentTemp = new File("agentTemp");
    final File buildTemp = new File("buildTemp");
    final File globalTemp = new File("globalTemp");
    UserCredentials userCredentials = new UserCredentials(
      profile,
      username,
      "password78",
      WindowsIntegrityLevel.High,
      LoggingLevel.Debug,
      Arrays.asList(new CommandLineArgument("arg1", CommandLineArgument.Type.PARAMETER), new CommandLineArgument("arg2", CommandLineArgument.Type.PARAMETER)));

    myCtx.checking(new Expectations() {{
      configureExpectations();
    }

      void configureExpectations() {
        one(myAgentParametersService).tryGetConfigParameter(RUN_AS_ACL_DEFAULTS_ENABLED);
        will(returnValue(isDefaultsAclEnabledStr));

        allowing(myPathsService).getPath(WellKnownPaths.Work);
        will(returnValue(work));

        allowing(myPathsService).getPath(WellKnownPaths.Log);
        will(returnValue(log));