> +import com.google.common.base.Charsets;
> +import com.google.common.io.ByteStreams;
> +
> +@Test
> +public class BasePayloadSlicerTest {
> +
> +   @Test
> +   public void testIterableSliceExpectedSingle() throws IOException {
> +      PayloadSlicer slicer = new BasePayloadSlicer();
> +      String data = "aaaaaaaaaabbbbbbbbbbccccc";
> +      Payload payload = new InputStreamPayload(new 
> ByteArrayInputStream(data.getBytes(Charsets.US_ASCII)));
> +
> +      Iterator<Payload> iter = slicer.slice(payload, 25).iterator();
> +      
> +      assertTrue(iter.hasNext(), "Not enough results");
> +      assertEquals(new String(ByteStreams.toByteArray(iter.next())), data);

TestNG uses ["actual, 
expected"](http://testng.org/javadoc/org/testng/Assert.html) rather than (as 
here) "expected, actual"

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

Reply via email to