Stay organized with collections
Save and categorize content based on your preferences.
public final class MetadataTestHelper
Summary
Public methods |
static final @NonNull Metadata |
Creates a new Metadata object by copying existing fields and overriding specified properties for testing.
|
Public methods
public static final @NonNull Metadata populatedWithTestValues(
@NonNull Metadata receiver,
@NonNull String id,
@NonNull DataOrigin dataOrigin,
@NonNull Instant lastModifiedTime
)
Creates a new Metadata object by copying existing fields and overriding specified properties for testing.
This method facilitates the creation of Metadata instances with controlled values, particularly useful for unit testing scenarios where specific metadata properties need to be set. It constructs a new Metadata object based on the current instance, allowing the modification of the id, dataOrigin, and lastModifiedTime fields.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-12 UTC."],[],[]]