PutBlockOptions extends BaseHttpRequestOptions { public PutBlockOptions range(long start, long end) { checkArgument(start >= 0, "start must be >= 0"); checkArgument(end >= 0, "end must be >= 0"); range = String.format("bytes %d-%d/*", start, end); return this; }  @Override Multimap<String, String> buildRequestHeaders(); String getRange(); PutBlockOptions range(long start, long end); static final PutBlockOptions NONE; }
@Test public void testRange() { PutBlockOptions options = new PutBlockOptions(); options.range(0, 1024); bytes1to1024(options); }
@Test public void testRangeStatic() { PutBlockOptions options = range(0, 1024); bytes1to1024(options); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testRangeNegative1() { range(-1, 0); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testRangeNegative2() { range(0, -1); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testRangeNegative() { range(-1, -1); }