AgentConfig agentConfig1 = Mockito.spy(agentConfig);
AgentDaemon agent = new AgentDaemon(agentConfig1);
URL scriptUrl = this.getClass().getResource("/grinder.properties");
File scriptFile = new File(scriptUrl.getFile());
GrinderProperties properties = new GrinderProperties(scriptFile);
agent.run(properties);
ThreadUtils.sleep(10000);
}
public int getFreePort() {
ServerSocket socket = null;