Adding s3 test and mock code needed for it.