GetOptions { public GetOptions ifUnmodifiedSince(Date ifUnmodifiedSince) { checkArgument(getIfNoneMatch() == null, "ifETagDoesntMatch() is not compatible with ifUnmodifiedSince()"); checkArgument(getIfModifiedSince() == null, "ifModifiedSince() is not compatible with ifUnmodifiedSince()"); this.ifUnmodifiedSince = checkNotNull(ifUnmodifiedSince, "ifUnmodifiedSince"); return this; }  GetOptions range(long start, long end); GetOptions startAt(long start); GetOptions tail(long length); GetOptions ifModifiedSince(Date ifModifiedSince); Date getIfModifiedSince(); GetOptions ifUnmodifiedSince(Date ifUnmodifiedSince); Date 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 testIfUnmodifiedSince() { GetOptions options = new GetOptions(); options.ifUnmodifiedSince(now); isNowExpected(options); }
@Test public void testIfUnmodifiedSinceStatic() { GetOptions options = ifUnmodifiedSince(now); isNowExpected(options); }
@Test(expectedExceptions = NullPointerException.class) public void testIfUnmodifiedSinceNPE() { ifUnmodifiedSince(null); }