> +
> +import org.jclouds.io.ByteSources;
> +import org.jclouds.io.payloads.ByteSourcePayload;
> +import org.testng.annotations.Test;
> +
> +import com.google.common.io.ByteSource;
> +
> +@Test(groups = "unit", testName = "TreeHasherTest")
> +public class TreeHashTest {
> +
> +   private static final int MB = 1024 * 1024;
> +
> +   @Test
> +   public void testTreeHasherWith1MBPayload() throws IOException {
> +      TreeHash th = TreeHash.Hasher.buildTreeHashFromPayload(new 
> ByteSourcePayload(getData(1 * MB)));
> +      assertEquals(th.getLinearHash().toString(), 
> "9bc1b2a288b26af7257a36277ae3816a7d4f16e89c1e7e77d0a5c48bad62b360");

Discussed offline, but the following is safer:

```
assertEquals(th.getLinearHash(), 
HashCode.fromString("9bc1b2a288b26af7257a36277ae3816a7d4f16e89c1e7e77d0a5c48bad62b360"));
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/11/files#r13825960

Reply via email to