@Test
public void testPreconditionsModified() throws ParseException {
ContainerRequest r = new ContainerRequest(
URI.create("http://example.org/app"), URI.create("http://example.org/app/resource"),
"GET", SECURITY_CONTEXT, new MapPropertiesDelegate());
r.header(HttpHeaders.IF_MODIFIED_SINCE, "Sat, 29 Oct 2011 19:43:31 GMT");
SimpleDateFormat f = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss Z", Locale.ENGLISH);
Date date = f.parse("Sat, 29 Oct 2011 19:43:31 GMT");
assertEquals(r.evaluatePreconditions(date).build().getStatus(),
Response.Status.NOT_MODIFIED.getStatusCode());