Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.List;

/**
* A helper class that represents a strongly typed notification item sent to EvenBridge
* A helper class that represents a strongly typed notification item sent to EventBridge
*/
public class S3EventBridgeNotification {
private final String version;
Expand Down Expand Up @@ -156,13 +156,13 @@ public String getName() {

public static class Object {
private final String key;
private final int size;
private final long size;
private final String etag;
private final String versionId;
private final String sequencer;

public Object(@JsonProperty(value = "key") final String key,
@JsonProperty(value = "size") final int size,
@JsonProperty(value = "size") final long size,
@JsonProperty(value = "etag") final String etag,
@JsonProperty(value = "version-id") final String versionId,
@JsonProperty(value = "sequencer") final String sequencer) {
Expand All @@ -173,7 +173,7 @@ public Object(@JsonProperty(value = "key") final String key,
this.sequencer = sequencer;
}

public int getSize() {
public long getSize() {
return size;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void setUp() {
message = mock(Message.class);
testBucketName = UUID.randomUUID().toString();
testDecodedObjectKey = UUID.randomUUID().toString();
testSize = RANDOM.nextInt(1_000_000_000) + 1;
testSize = Math.abs(RANDOM.nextLong() % 1_000_000_000_000L) + 1;
}

@Test
Expand Down Expand Up @@ -168,7 +168,7 @@ void setUp() {

when(bucket.getName()).thenReturn(testBucketName);
when(object.getUrlDecodedKey()).thenReturn(testDecodedObjectKey);
when(object.getSize()).thenReturn((int) testSize);
when(object.getSize()).thenReturn(testSize);
when(s3EventBridgeNotification.getDetailType()).thenReturn(testDetailType);
when(s3EventBridgeNotification.getTime()).thenReturn(testEventTime);
}
Expand Down
Loading