GetOptions extends BaseHttpRequestOptions { public GetOptions ifModifiedSince(Date ifModifiedSince) { checkArgument(getIfMatch() == null, "ifETagMatches() is not compatible with ifModifiedSince()"); checkArgument(getIfUnmodifiedSince() == null, "ifUnmodifiedSince() is not compatible with ifModifiedSince()"); this.headers.put(IF_MODIFIED_SINCE, dateService.rfc822DateFormat(checkNotNull(ifModifiedSince, "ifModifiedSince"))); 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 testIfModifiedSince() { GetOptions options = new GetOptions(); options.ifModifiedSince(now); assertEquals(options.getIfModifiedSince(), nowExpected); }
@Test(expectedExceptions = NullPointerException.class) public void testIfModifiedSinceNPE() { ifModifiedSince(null); }