@Test
public void testWithNotGlowrootJarButWithTestDir() throws Exception {

    System.setProperty("glowroot.test.dir", ".");
    try {
        File glowrootJar = new File("x/classes");
        CodeSource codeSource = new CodeSource(glowrootJar.toURI().toURL(), new Certificate[0]);
        assertThat(AgentPremain.getGlowrootJarFile(codeSource)).isNull();
    } finally {
        System.clearProperty("glowroot.test.dir");
    }
}