> +@Test(groups = "unit", testName = "TreeHasherTest")
> +public class TreeHasherTest {
> +
> + private static final int MB = 1024 * 1024;
> +
> + @Test
> + public void testTreeHasherWith1MBPayload() throws IOException {
> + Payload payload = new ByteSourcePayload(getData(1 * MB));
> + TreeHasher hasher1 = new TreeHasher(payload);
> + assertEquals(hasher1.getHash().toString(),
> "9bc1b2a288b26af7257a36277ae3816a7d4f16e89c1e7e77d0a5c48bad62b360");
> + assertEquals(hasher1.getTreeHash().toString(),
> "9bc1b2a288b26af7257a36277ae3816a7d4f16e89c1e7e77d0a5c48bad62b360");
> + }
> +
> + @Test
> + public void testTreeHasherWith2MBPayload() throws IOException {
> + Payload payload2 = new ByteSourcePayload(getData(2 * MB));
Need a unit test for an odd number of chunks, e.g., 3?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/11/files#r13791834