Instrumenter { public static final void instrument(String rtJar, String outJar) throws NoSuchAlgorithmException, IOException { Logger.getGlobal().log(Level.FINE, "Instrumenting " + rtJar + " into " + outJar); new Instrumenter().process(rtJar, outJar); } private  Instrumenter(); static final void instrument(String rtJar, String outJar); static final String hashMapName; static final String weakHashMapName; static final String identityHashMapName; static final String concurrentHashMapName; static final String methodName; static final String priorityQueueName; static final String priorityBlockingQueueName; }
@Test public void emptyZipTest() throws NoSuchAlgorithmException, IOException { Instrumenter.instrument(Paths.get("resources", "empty.jar").toString(), outJar.toString()); assertTrue(Files.exists(outJar, LinkOption.NOFOLLOW_LINKS)); }
@Test public void nonexistantZipTest() throws NoSuchAlgorithmException { try { Instrumenter.instrument(Paths.get("resources", "doesnotexist.jar").toString(), Paths.get("resources", "doesnotexistOut.jar").toString()); fail("Expected an IOException to be thrown"); } catch (IOException exc) { assertThat(exc.getMessage(), containsString(Paths.get("resources", "doesnotexist.jar").toString())); } }