@Test public void emptyDeleteAt() { expectStatusCode(202); List<Header> headers = new ArrayList<Header>(); prepareHeader(response, LAST_MODIFIED, "Mon, 03 Sep 2012 05:40:33 GMT", headers); prepareHeadersForRetrieval(response, headers); assertNull(object.getDeleteAt()); assertNull(object.getDeleteAtAsDate()); }
@Test public void getMetadata() throws IOException, DateParseException { expectStatusCode(202); prepareMetadata(); assertEquals("1989", object.getMetadata().get("Year")); assertEquals("42 BV", object.getMetadata().get("Company")); assertEquals("Mon, 03 Sep 2012 05:40:33 GMT", object.getLastModified()); assertEquals( DateUtils.parseDate("Mon, 03 Sep 2012 05:40:33 GMT"), object.getLastModifiedAsDate()); assertEquals(654321, object.getContentLength()); assertEquals("image/png", object.getContentType()); assertEquals("cae4ebb15a282e98ba7b65402a72f57c", object.getEtag()); assertEquals("1339429105", object.getDeleteAt()); assertEquals(DateUtils.parseDate("Mon, 11 Jun 2012 15:38:25 GMT"), object.getDeleteAtAsDate()); }