@Test public void computes_checksum_of_queries() { assertThat(checksum(asList("MATCH (n) RETURN n", "MATCH (m) RETURN m"))) .isEqualTo("9c68d381cf24b9cab5843a506229c5dee1083f8e"); }
public static String checksum(Collection<String> queries) { MessageDigest messageDigest = sha1MessageDigest(); for (String query : queries) { messageDigest.update(query.getBytes(UTF_8)); } return buildHexadecimalRepresentation(messageDigest.digest()); }
Checksums { public static String checksum(Collection<String> queries) { MessageDigest messageDigest = sha1MessageDigest(); for (String query : queries) { messageDigest.update(query.getBytes(UTF_8)); } return buildHexadecimalRepresentation(messageDigest.digest()); } }
Checksums { public static String checksum(Collection<String> queries) { MessageDigest messageDigest = sha1MessageDigest(); for (String query : queries) { messageDigest.update(query.getBytes(UTF_8)); } return buildHexadecimalRepresentation(messageDigest.digest()); }  }
Checksums { public static String checksum(Collection<String> queries) { MessageDigest messageDigest = sha1MessageDigest(); for (String query : queries) { messageDigest.update(query.getBytes(UTF_8)); } return buildHexadecimalRepresentation(messageDigest.digest()); }  static String checksum(Collection<String> queries); }
Checksums { public static String checksum(Collection<String> queries) { MessageDigest messageDigest = sha1MessageDigest(); for (String query : queries) { messageDigest.update(query.getBytes(UTF_8)); } return buildHexadecimalRepresentation(messageDigest.digest()); }  static String checksum(Collection<String> queries);  }