@Test
    public void shouldThrowIllegalStateException() {
        final String name = "gremlin-groovy";
        final Artifact a = new Artifact(GROUP_ID, name, VERSION);
        final File pluginDir = new File(extTestDir, name);

        // install the plugin for the first time
        dg.copyDependenciesToPath(a);
        assertTrue("Plugin installation directory exists", pluginDir.exists());

        // attempt to install plugin a second time
        try {
            dg.copyDependenciesToPath(a);

            fail("The plugin re-installed");

        } catch (Exception ise) {
          assertTrue("Plugin re-install keeps the installation directory", pluginDir.exists());
        }
    }
@author Jason Plurad (http://github.com/pluradj)
gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/util/DependencyGrabberIntegrateTest.java