diff --git a/core/src/test/java/google/registry/model/domain/token/AllocationTokenTest.java b/core/src/test/java/google/registry/model/domain/token/AllocationTokenTest.java index f9f43945f..455b69806 100644 --- a/core/src/test/java/google/registry/model/domain/token/AllocationTokenTest.java +++ b/core/src/test/java/google/registry/model/domain/token/AllocationTokenTest.java @@ -224,11 +224,13 @@ public class AllocationTokenTest extends EntityTestCase { @Test void testBuild_redemptionHistoryEntryOnlyInSingleUse() { + DomainBase domain = persistActiveDomain("blahdomain.foo"); + Key historyEntryKey = Key.create(Key.create(domain), HistoryEntry.class, 1); AllocationToken.Builder builder = new AllocationToken.Builder() .setToken("foobar") .setTokenType(TokenType.UNLIMITED_USE) - .setRedemptionHistoryEntry(VKey.create(HistoryEntry.class, 1L)); + .setRedemptionHistoryEntry(VKey.create(HistoryEntry.class, 1L, historyEntryKey)); IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class, builder::build); assertThat(thrown) .hasMessageThat()