@Test public void buildWithValidArgumentsShouldBuild() { AttachmentAccessToken expected = new AttachmentAccessToken(USERNAME, BLOB_ID, EXPIRATION_DATE, SIGNATURE); AttachmentAccessToken actual = AttachmentAccessToken.builder() .username(USERNAME) .blobId(BLOB_ID) .expirationDate(EXPIRATION_DATE) .signature(SIGNATURE) .build(); assertThat(actual).isEqualToComparingFieldByField(expected); }
public static Builder builder() { return new Builder(); }
AttachmentAccessToken implements SignedExpiringToken { public static Builder builder() { return new Builder(); } }
AttachmentAccessToken implements SignedExpiringToken { public static Builder builder() { return new Builder(); } @VisibleForTesting  AttachmentAccessToken(String username, String blobId, ZonedDateTime expirationDate, String signature); }
AttachmentAccessToken implements SignedExpiringToken { public static Builder builder() { return new Builder(); } @VisibleForTesting  AttachmentAccessToken(String username, String blobId, ZonedDateTime expirationDate, String signature); static Builder builder(); static AttachmentAccessToken from(String serializedAttachmentAccessToken, String blobId); String getBlobId(); String getUsername(); @Override ZonedDateTime getExpirationDate(); @Override String getSignature(); String serialize(); @Override String getPayload(); @Override String getSignedContent(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
AttachmentAccessToken implements SignedExpiringToken { public static Builder builder() { return new Builder(); } @VisibleForTesting  AttachmentAccessToken(String username, String blobId, ZonedDateTime expirationDate, String signature); static Builder builder(); static AttachmentAccessToken from(String serializedAttachmentAccessToken, String blobId); String getBlobId(); String getUsername(); @Override ZonedDateTime getExpirationDate(); @Override String getSignature(); String serialize(); @Override String getPayload(); @Override String getSignedContent(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); static final String SEPARATOR; }