### Question:
S3Object { DateTime parseDateTimeFromKey() { return dateTime; } S3Object(String bucket, String key); String bucket(); String key(); String keyPart(int index); int keyLength(); boolean hasDateTimeKey();  }### Answer:
@Test public void shouldParseDateFromKey() { String key = "/prefix/2016/12/15/03/some-file.txt"; S3Object s3Object = new S3Object("my-bucket", key); assertEquals(new DateTime(2016, 12, 15, 3, 0), s3Object.parseDateTimeFromKey()); }