This commit is contained in:
Phillip Webb
2014-10-21 20:33:00 -07:00
parent d1ce83e3c3
commit 2e7aa4685b
33 changed files with 121 additions and 161 deletions

View File

@@ -29,7 +29,7 @@ import org.springframework.boot.loader.archive.Archive.Entry;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
import static org.mockito.BDDMockito.given;
/**
* Tests for {@link ExecutableArchiveLauncher}
@@ -71,9 +71,7 @@ public class ExecutableArchiveLauncherTests {
public void javaAgentJarsAreExcludedFromClasspath() throws Exception {
URL javaAgent = new File("my-agent.jar").getCanonicalFile().toURI().toURL();
final URL one = new URL("file:one");
when(this.javaAgentDetector.isJavaAgentJar(javaAgent)).thenReturn(true);
given(this.javaAgentDetector.isJavaAgentJar(javaAgent)).willReturn(true);
doWithTccl(new URLClassLoader(new URL[] { javaAgent, one }),
new Callable<Void>() {