diff --git a/javatests/google/registry/testing/AbstractEppResourceSubject.java b/javatests/google/registry/testing/AbstractEppResourceSubject.java index fe847da8a..267e2a972 100644 --- a/javatests/google/registry/testing/AbstractEppResourceSubject.java +++ b/javatests/google/registry/testing/AbstractEppResourceSubject.java @@ -47,11 +47,11 @@ abstract class AbstractEppResourceSubject @SuppressWarnings("unchecked") protected And andChainer() { - return new And((S) this); + return new And<>((S) this); } @Override - public String getDisplaySubject() { + public String actualCustomStringRepresentation() { return String.format( "%s with foreign key '%s'", actual().getClass().getSimpleName(), @@ -115,7 +115,7 @@ abstract class AbstractEppResourceSubject failWithBadResults( "has at least number of history entries", index + 1, historyEntries.size()); } - return new Which(assertAboutHistoryEntries() + return new Which<>(assertAboutHistoryEntries() .that(getHistoryEntries().get(index)).withCustomDisplaySubject(String.format( "the history entry for %s at index %s", getDisplaySubject(), index))); } diff --git a/javatests/google/registry/testing/HistoryEntrySubject.java b/javatests/google/registry/testing/HistoryEntrySubject.java index 623911489..e062324db 100644 --- a/javatests/google/registry/testing/HistoryEntrySubject.java +++ b/javatests/google/registry/testing/HistoryEntrySubject.java @@ -39,7 +39,7 @@ public class HistoryEntrySubject extends Subject(this); + return new And<>(this); } public And hasPeriodYears(int years) { @@ -73,7 +73,7 @@ public class HistoryEntrySubject extends Subject(this); + return new And<>(this); } public And hasMetadataReason(String reason) { @@ -85,7 +85,7 @@ public class HistoryEntrySubject extends Subject(this); + return new And<>(this); } protected void failWithBadResults(String dualVerb, Object expected, Object actual) { @@ -96,7 +96,7 @@ public class HistoryEntrySubject extends Subject(this); + return new And<>(this); } public static DelegatedVerb assertAboutHistoryEntries() {