GetOptions extends BaseHttpRequestOptions { public GetOptions startAt(long start) { checkArgument(start >= 0, "start must be >= 0"); ranges.add(String.format("%d-", start)); return this; }  @Override Multimap<String, String> buildRequestHeaders(); GetOptions range(long start, long end); GetOptions startAt(long start); GetOptions tail(long count); String getRange(); GetOptions ifModifiedSince(Date ifModifiedSince); String getIfModifiedSince(); GetOptions ifUnmodifiedSince(Date ifUnmodifiedSince); String getIfUnmodifiedSince(); GetOptions ifETagMatches(String eTag); String getIfMatch(); GetOptions ifETagDoesntMatch(String eTag); String getIfNoneMatch(); List<String> getRanges(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final GetOptions NONE; }
@Test public void testStartAt() { GetOptions options = new GetOptions(); options.startAt(100); assertEquals(options.getRange(), "bytes=100-"); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testStartAtFail() { GetOptions options = new GetOptions(); options.startAt(-1); }