> +
> +      assertTrue(iter.hasNext(), "Not enough results");
> +      assertEquals(new String(ByteStreams.toByteArray(iter.next())), 
> contents);
> +      assertFalse(iter.hasNext());
> +
> +   }
> +   
> +   @Test
> +   public void testIterableSliceExpectedMulti() throws IOException {
> +      PayloadSlicer slicer = new BasePayloadSlicer();
> +      Payload payload = new InputStreamPayload(new 
> ByteArrayInputStream("aaaaaaaaaabbbbbbbbbbccccc".getBytes(Charsets.US_ASCII)));
> +
> +      Iterator<Payload> iter = slicer.slice(payload, 10).iterator();
> +
> +      assertTrue(iter.hasNext(), "Not enough results");
> +      assertEquals(new String(ByteStreams.toByteArray(iter.next())), 
> "aaaaaaaaaa");

Call ```Strings2.toStringAndClose```.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/192/files#r8215165

Reply via email to