AgentClassPathResolver { public void initialize() { Matcher matcher = LIGHT_AGENT_PATTERN.matcher(classPath); if (matcher.find()) { agentJarName = parseAgentJar(matcher); agentJarPath = parseAgentJarPathOrNull(); agentCoreJarName = findAgentCoreJarNameOrNull(); agentCommonJarName = findAgentCommonJarNameOrNull(); initialize = true; } } AgentClassPathResolver();  AgentClassPathResolver(String classPath); void initialize(); boolean isInitialize(); List<URL> findAllBootClassPathLibrary(); List<URL> findAllAgentLibrary(); List<URL> findAllAgentLibrary(String libraryPath); String getAgentJarName(); String getAgentJarPath(); String getAgentCoreJarName(); String getAgentCommonJarName(); String getAgentCoreJarAbsoluteName(); String getAgentCommonJarAbsoluteName(); String getAgentLibraryPath(); static final String java_class_path; }
@Test public void testInitialize() { AgentClassPathResolver resolver = new AgentClassPathResolver(CLASS_PATH); assertThat(true, is(resolver.isInitialize())); assertThat(resolver, hasProperty("agentJarName")); assertThat(resolver, hasProperty("agentJarPath")); assertThat(resolver, hasProperty("agentCoreJarName")); assertThat(resolver.getAgentJarName(), is(LIGHT_AGENT_JAR)); assertThat(resolver.getAgentJarPath(), is(LIGHT_AGENT_JAR_PATH)); assertThat(resolver.getAgentCoreJarName(), nullValue()); assertThat(resolver.getAgentJarName(), containsString("light.agent")); }