### Question:
ElasticApmAttacher { static String md5Hash(InputStream resourceAsStream) throws IOException, NoSuchAlgorithmException { try (InputStream agentJar = resourceAsStream) { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] buffer = new byte[1024]; DigestInputStream dis = new DigestInputStream(agentJar, md); while (dis.read(buffer) != -1) {} return String.format("%032x", new BigInteger(1, md.digest())); } }  static void attach(); static void attach(String propertiesLocation); static void attach(Map<String, String> configuration); static void attach(String pid, Map<String, String> configuration); @Deprecated static void attach(String pid, String agentArgs);  }### Answer:
@Test void testHash() throws Exception { assertThat(ElasticApmAttacher.md5Hash(getClass().getResourceAsStream(ElasticApmAttacher.class.getSimpleName() + ".class"))) .isEqualTo(DigestUtils.md5Hex(getClass().getResourceAsStream(ElasticApmAttacher.class.getSimpleName() + ".class"))); }