@Test(expected = NullPointerException.class) public void shouldFormatPayloadFailIfNullS3File() { AmazonAuthHelper helper = new AmazonAuthHelper(null, new S3User("bucket", null, null)); helper.formatPayloadForPut("12-12-2009", PAYLOAD_PUT_PUBLIC, null); }
@VisibleForTesting String formatPayloadForPut(String date, String payloadStr, S3File s3File) { return String.format(payloadStr, s3File.getMd5Base64(), s3File.getContentType(), date, s3User.getBucket(), s3File.getObjectKey()); }
AmazonAuthHelper { @VisibleForTesting String formatPayloadForPut(String date, String payloadStr, S3File s3File) { return String.format(payloadStr, s3File.getMd5Base64(), s3File.getContentType(), date, s3User.getBucket(), s3File.getObjectKey()); } }
AmazonAuthHelper { @VisibleForTesting String formatPayloadForPut(String date, String payloadStr, S3File s3File) { return String.format(payloadStr, s3File.getMd5Base64(), s3File.getContentType(), date, s3User.getBucket(), s3File.getObjectKey()); } @Inject  AmazonAuthHelper(SignatureHelper signatureHelper, S3User s3User); }
AmazonAuthHelper { @VisibleForTesting String formatPayloadForPut(String date, String payloadStr, S3File s3File) { return String.format(payloadStr, s3File.getMd5Base64(), s3File.getContentType(), date, s3User.getBucket(), s3File.getObjectKey()); } @Inject  AmazonAuthHelper(SignatureHelper signatureHelper, S3User s3User); @NonNull String getAmazonAuthForPut(String date, String payloadStr, S3File s3File); @NonNull String getAmazonAuthForGet(String date, String payloadStr, String filename); }
AmazonAuthHelper { @VisibleForTesting String formatPayloadForPut(String date, String payloadStr, S3File s3File) { return String.format(payloadStr, s3File.getMd5Base64(), s3File.getContentType(), date, s3User.getBucket(), s3File.getObjectKey()); } @Inject  AmazonAuthHelper(SignatureHelper signatureHelper, S3User s3User); @NonNull String getAmazonAuthForPut(String date, String payloadStr, S3File s3File); @NonNull String getAmazonAuthForGet(String date, String payloadStr, String filename);  }