Add createVKey() at the EppResource level (#600)

* Add createVKey() at the EppResource level

Also convert createKey() to createVKey() to normalize with what we've settled
on.
This commit is contained in:
Michael Muller 2020-05-29 08:36:57 -04:00 committed by GitHub
parent 2b794347e6
commit c23d4f3ba5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 80 additions and 66 deletions

View file

@ -609,7 +609,7 @@ public class DeleteContactsAndHostsActionTest
.hasDeletionTime(END_OF_TIME);
DomainBase domain =
loadByForeignKey(DomainBase.class, "example.tld", clock.nowUtc()).get();
assertThat(domain.getNameservers()).contains(hostAfter.createKey());
assertThat(domain.getNameservers()).contains(hostAfter.createVKey());
HistoryEntry historyEntry = getOnlyHistoryEntryOfType(hostAfter, HOST_DELETE_FAILURE);
assertPollMessageFor(
historyEntry,
@ -679,7 +679,7 @@ public class DeleteContactsAndHostsActionTest
persistResource(
newDomainBase("example.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(host.createKey()))
.setNameservers(ImmutableSet.of(host.createVKey()))
.setDeletionTime(clock.nowUtc().minusDays(5))
.build());
enqueuer.enqueueAsyncDelete(
@ -938,7 +938,7 @@ public class DeleteContactsAndHostsActionTest
return persistResource(
newDomainBase(domainName, contact)
.asBuilder()
.setNameservers(ImmutableSet.of(host.createKey()))
.setNameservers(ImmutableSet.of(host.createVKey()))
.build());
}

View file

@ -294,7 +294,7 @@ public class CloudDnsWriterTest {
ImmutableSet.Builder<VKey<HostResource>> hostResourceRefBuilder = new ImmutableSet.Builder<>();
for (HostResource nameserver : nameservers) {
hostResourceRefBuilder.add(nameserver.createKey());
hostResourceRefBuilder.add(nameserver.createVKey());
}
return newDomainBase(domainName)

View file

@ -105,7 +105,7 @@ public class DnsUpdateWriterTest {
DomainBase domain =
persistActiveDomain("example.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(host1.createKey(), host2.createKey()))
.setNameservers(ImmutableSet.of(host1.createVKey(), host2.createVKey()))
.build();
persistResource(domain);
@ -126,7 +126,7 @@ public class DnsUpdateWriterTest {
DomainBase domain1 =
persistActiveDomain("example1.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(host1.createKey()))
.setNameservers(ImmutableSet.of(host1.createVKey()))
.build();
persistResource(domain1);
@ -134,7 +134,7 @@ public class DnsUpdateWriterTest {
DomainBase domain2 =
persistActiveDomain("example2.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(host2.createKey()))
.setNameservers(ImmutableSet.of(host2.createVKey()))
.build();
persistResource(domain2);
@ -150,7 +150,7 @@ public class DnsUpdateWriterTest {
DomainBase domain1 =
persistActiveDomain("example1.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(host1.createKey()))
.setNameservers(ImmutableSet.of(host1.createVKey()))
.build();
persistResource(domain1);
@ -158,7 +158,7 @@ public class DnsUpdateWriterTest {
DomainBase domain2 =
persistActiveDomain("example2.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(host2.createKey()))
.setNameservers(ImmutableSet.of(host2.createVKey()))
.build();
persistResource(domain2);
@ -181,7 +181,7 @@ public class DnsUpdateWriterTest {
DomainBase domain =
persistActiveDomain("example.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.tld").createKey()))
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.tld").createVKey()))
.setDsData(
ImmutableSet.of(
DelegationSignerData.create(1, 3, 1, base16().decode("0123456789ABCDEF"))))
@ -206,7 +206,7 @@ public class DnsUpdateWriterTest {
persistActiveDomain("example.tld")
.asBuilder()
.addStatusValue(StatusValue.SERVER_HOLD)
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.tld").createKey()))
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.tld").createVKey()))
.build();
persistResource(domain);
@ -250,7 +250,7 @@ public class DnsUpdateWriterTest {
newDomainBase("example.tld")
.asBuilder()
.addSubordinateHost("ns1.example.tld")
.addNameserver(host.createKey())
.addNameserver(host.createVKey())
.build());
writer.publishHost("ns1.example.tld");
@ -289,7 +289,7 @@ public class DnsUpdateWriterTest {
persistResource(
persistActiveDomain("example.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.com").createKey()))
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.com").createVKey()))
.build());
writer.publishHost("ns1.example.tld");
@ -323,7 +323,8 @@ public class DnsUpdateWriterTest {
.asBuilder()
.addSubordinateHost("ns1.example.tld")
.addNameservers(
ImmutableSet.of(externalNameserver.createKey(), inBailiwickNameserver.createKey()))
ImmutableSet.of(
externalNameserver.createVKey(), inBailiwickNameserver.createVKey()))
.build());
writer.publishDomain("example.tld");
@ -358,7 +359,7 @@ public class DnsUpdateWriterTest {
.asBuilder()
.addSubordinateHost("ns1.example.tld")
.addSubordinateHost("foo.example.tld")
.addNameserver(inBailiwickNameserver.createKey())
.addNameserver(inBailiwickNameserver.createVKey())
.build());
writer.publishDomain("example.tld");
@ -382,7 +383,7 @@ public class DnsUpdateWriterTest {
DomainBase domain =
persistActiveDomain("example.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.tld").createKey()))
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.tld").createVKey()))
.build();
persistResource(domain);
when(mockResolver.send(any(Message.class))).thenReturn(messageWithResponseCode(Rcode.SERVFAIL));

View file

@ -693,7 +693,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
loadByForeignKey(DomainBase.class, getUniqueIdFromCommand(), clock.nowUtc())
.get()
.asBuilder()
.setNameservers(ImmutableSet.of(host.createKey()))
.setNameservers(ImmutableSet.of(host.createVKey()))
.build());
// Persist another domain that's already been deleted and references this contact and host.
persistResource(
@ -703,7 +703,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
loadByForeignKey(ContactResource.class, "sh8013", clock.nowUtc())
.get()
.createVKey())
.setNameservers(ImmutableSet.of(host.createKey()))
.setNameservers(ImmutableSet.of(host.createVKey()))
.setDeletionTime(START_OF_TIME)
.build());
clock.advanceOneMilli();

View file

@ -118,7 +118,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
DesignatedContact.create(Type.ADMIN, contact.createVKey()),
DesignatedContact.create(Type.TECH, contact.createVKey())))
.setNameservers(
inactive ? null : ImmutableSet.of(host1.createKey(), host2.createKey()))
inactive ? null : ImmutableSet.of(host1.createVKey(), host2.createVKey()))
.setAuthInfo(DomainAuthInfo.create(PasswordAuth.create("2fooBAR")))
.build());
// Set the superordinate domain of ns1.example.com to example.com. In reality, this would have
@ -294,7 +294,7 @@ public class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, Dom
ImmutableSet.of(
DelegationSignerData.create(
12345, 3, 1, base16().decode("49FD46E6C4B45C55D4AC"))))
.setNameservers(ImmutableSet.of(host1.createKey(), host3.createKey()))
.setNameservers(ImmutableSet.of(host1.createVKey(), host3.createVKey()))
.build());
doSuccessfulTest("domain_info_response_dsdata.xml", false);
}

View file

@ -139,7 +139,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
DesignatedContact.create(Type.ADMIN, mak21Contact.createVKey()),
DesignatedContact.create(Type.BILLING, mak21Contact.createVKey())))
.setRegistrant(mak21Contact.createVKey())
.setNameservers(ImmutableSet.of(host.createKey()))
.setNameservers(ImmutableSet.of(host.createVKey()))
.build());
historyEntryDomainCreate =
persistResource(
@ -162,7 +162,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
ImmutableSet.of(
DesignatedContact.create(Type.TECH, sh8013Contact.createVKey()),
DesignatedContact.create(Type.ADMIN, unusedContact.createVKey())))
.setNameservers(ImmutableSet.of(host.createKey()))
.setNameservers(ImmutableSet.of(host.createVKey()))
.build());
historyEntryDomainCreate =
persistResource(
@ -263,7 +263,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
loadByForeignKey(
HostResource.class, String.format("ns%d.example.foo", i), clock.nowUtc())
.get()
.createKey());
.createVKey());
}
}
persistResource(
@ -290,7 +290,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
for (int i = 0; i < 26; i++) {
HostResource host = persistActiveHost(String.format("max_test_%d.example.tld", i));
if (i < 13) {
nameservers.add(host.createKey());
nameservers.add(host.createVKey());
}
}
ImmutableList.Builder<DesignatedContact> contactsBuilder = new ImmutableList.Builder<>();
@ -378,13 +378,13 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
ImmutableSet.of(
loadByForeignKey(HostResource.class, "ns1.example.tld", clock.nowUtc())
.get()
.createKey()))
.createVKey()))
.build());
clock.advanceOneMilli();
assertTransactionalFlow(true);
runFlowAssertResponse(loadFile("generic_success_response.xml"));
domain = reloadResourceByForeignKey();
assertThat(domain.getNameservers()).containsExactly(addedHost.createKey());
assertThat(domain.getNameservers()).containsExactly(addedHost.createVKey());
assertThat(domain.getSubordinateHosts()).containsExactly("ns1.example.tld", "ns2.example.tld");
HostResource existingHost =
loadByForeignKey(HostResource.class, "ns1.example.tld", clock.nowUtc()).get();
@ -1061,7 +1061,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
ImmutableSet.of(
loadByForeignKey(HostResource.class, "ns1.example.foo", clock.nowUtc())
.get()
.createKey()))
.createVKey()))
.build());
EppException thrown = assertThrows(AddRemoveSameValueException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
@ -1202,13 +1202,13 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
.doesNotContain(
loadByForeignKey(HostResource.class, "ns2.example.foo", clock.nowUtc())
.get()
.createKey());
.createVKey());
runFlow();
assertThat(reloadResourceByForeignKey().getNameservers())
.contains(
loadByForeignKey(HostResource.class, "ns2.example.foo", clock.nowUtc())
.get()
.createKey());
.createVKey());
}
@Test
@ -1279,7 +1279,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
.addNameserver(
loadByForeignKey(HostResource.class, "ns2.example.foo", clock.nowUtc())
.get()
.createKey())
.createVKey())
.build());
persistResource(
Registry.get("tld")
@ -1291,7 +1291,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
.contains(
loadByForeignKey(HostResource.class, "ns1.example.foo", clock.nowUtc())
.get()
.createKey());
.createVKey());
clock.advanceOneMilli();
runFlow();
assertThat(reloadResourceByForeignKey().getNameservers())

View file

@ -284,7 +284,7 @@ public class HostDeleteFlowTest extends ResourceFlowTestCase<HostDeleteFlow, Hos
persistResource(
newDomainBase("example.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.tld").createKey()))
.setNameservers(ImmutableSet.of(persistActiveHost("ns1.example.tld").createVKey()))
.build());
EppException thrown = assertThrows(ResourceToDeleteIsReferencedException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();

View file

@ -92,7 +92,7 @@ public class HostInfoFlowTest extends ResourceFlowTestCase<HostInfoFlow, HostRes
persistResource(
newDomainBase("example.foobar")
.asBuilder()
.addNameserver(persistHostResource().createKey())
.addNameserver(persistHostResource().createVKey())
.build());
assertTransactionalFlow(false);
// Check that the persisted host info was returned.

View file

@ -195,7 +195,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
newDomainBase("test.xn--q9jyb4c")
.asBuilder()
.setDeletionTime(END_OF_TIME)
.setNameservers(ImmutableSet.of(host.createKey()))
.setNameservers(ImmutableSet.of(host.createVKey()))
.build());
HostResource renamedHost = doSuccessfulTest();
assertThat(renamedHost.isSubordinate()).isTrue();

View file

@ -79,7 +79,7 @@ public class DomainBaseTest extends EntityTestCase {
.setSuperordinateDomain(domainKey)
.setRepoId("1-COM")
.build())
.createKey();
.createVKey();
VKey<ContactResource> contact1Key =
persistResource(
new ContactResource.Builder()
@ -221,7 +221,7 @@ public class DomainBaseTest extends EntityTestCase {
assertThat(
newDomainBase("example.com")
.asBuilder()
.setNameservers(ImmutableSet.of(newHostResource("foo.example.tld").createKey()))
.setNameservers(ImmutableSet.of(newHostResource("foo.example.tld").createVKey()))
.build()
.nsHosts)
.isNotNull();
@ -269,7 +269,7 @@ public class DomainBaseTest extends EntityTestCase {
@Test
public void testImplicitStatusValues() {
ImmutableSet<VKey<HostResource>> nameservers =
ImmutableSet.of(newHostResource("foo.example.tld").createKey());
ImmutableSet.of(newHostResource("foo.example.tld").createVKey());
StatusValue[] statuses = {StatusValue.OK};
// OK is implicit if there's no other statuses but there are nameservers.
assertAboutDomains()

View file

@ -418,7 +418,7 @@ public class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDom
subordinateHostnamesBuilder.add(hostName);
HostResource host = makeAndPersistHostResource(
hostName, String.format("5.5.%d.%d", 5 + i / 250, i % 250), clock.nowUtc().minusYears(1));
hostKeysBuilder.add(host.createKey());
hostKeysBuilder.add(host.createVKey());
}
ImmutableSet<VKey<HostResource>> hostKeys = hostKeysBuilder.build();
// Create all the domains at once, then persist them in parallel, for increased efficiency.

View file

@ -269,9 +269,9 @@ public class DomainBaseToXjcConverterTest {
.setNameservers(
ImmutableSet.of(
makeHostResource(clock, "3-Q9JYB4C", "bird.or.devil.みんな", "1.2.3.4")
.createKey(),
.createVKey(),
makeHostResource(clock, "4-Q9JYB4C", "ns2.cat.みんな", "bad:f00d:cafe::15:beef")
.createKey()))
.createVKey()))
.setRegistrant(
makeContactResource(
clock, "12-Q9JYB4C", "5372808-ERL", "(◕‿◕) nevermore", "prophet@evil.みんな")

View file

@ -116,8 +116,8 @@ final class RdeFixtures {
.setIdnTableName("extended_latin")
.setNameservers(
ImmutableSet.of(
makeHostResource(clock, "bird.or.devil.みんな", "1.2.3.4").createKey(),
makeHostResource(clock, "ns2.cat.みんな", "bad:f00d:cafe::15:beef").createKey()))
makeHostResource(clock, "bird.or.devil.みんな", "1.2.3.4").createVKey(),
makeHostResource(clock, "ns2.cat.みんな", "bad:f00d:cafe::15:beef").createVKey()))
.setRegistrationExpirationTime(DateTime.parse("1994-01-01T00:00:00Z"))
.setGracePeriods(
ImmutableSet.of(

View file

@ -376,7 +376,7 @@ public class Spec11EmailUtilsTest {
return persistResource(
newDomainBase(domainName)
.asBuilder()
.setNameservers(ImmutableSet.of(host.createKey()))
.setNameservers(ImmutableSet.of(host.createVKey()))
.build());
}
}

View file

@ -131,8 +131,8 @@ public enum Fixture {
DesignatedContact.create(TECH, justine.createVKey())))
.setNameservers(
ImmutableSet.of(
persistActiveHost("ns1.love.xn--q9jyb4c").createKey(),
persistActiveHost("ns2.love.xn--q9jyb4c").createKey()))
persistActiveHost("ns1.love.xn--q9jyb4c").createVKey(),
persistActiveHost("ns2.love.xn--q9jyb4c").createVKey()))
.build());
persistResource(
@ -145,11 +145,11 @@ public enum Fixture {
DesignatedContact.create(TECH, justine.createVKey())))
.setNameservers(
ImmutableSet.of(
persistActiveHost("ns1.linode.com").createKey(),
persistActiveHost("ns2.linode.com").createKey(),
persistActiveHost("ns3.linode.com").createKey(),
persistActiveHost("ns4.linode.com").createKey(),
persistActiveHost("ns5.linode.com").createKey()))
persistActiveHost("ns1.linode.com").createVKey(),
persistActiveHost("ns2.linode.com").createVKey(),
persistActiveHost("ns3.linode.com").createVKey(),
persistActiveHost("ns4.linode.com").createVKey(),
persistActiveHost("ns5.linode.com").createVKey()))
.build());
persistResource(

View file

@ -139,7 +139,7 @@ public class DatastoreHelper {
public static DomainBase newDomainBase(String domainName, HostResource host) {
return newDomainBase(domainName)
.asBuilder()
.setNameservers(ImmutableSet.of(host.createKey()))
.setNameservers(ImmutableSet.of(host.createVKey()))
.build();
}

View file

@ -376,10 +376,10 @@ public final class FullFieldsTestEntityHelper {
if ((ns1 != null) || (ns2 != null)) {
ImmutableSet.Builder<VKey<HostResource>> nsBuilder = new ImmutableSet.Builder<>();
if (ns1 != null) {
nsBuilder.add(ns1.createKey());
nsBuilder.add(ns1.createVKey());
}
if (ns2 != null) {
nsBuilder.add(ns2.createKey());
nsBuilder.add(ns2.createVKey());
}
builder.setNameservers(nsBuilder.build());
}

View file

@ -147,7 +147,7 @@ public class GenerateDnsReportCommandTest extends CommandTestCase<GenerateDnsRep
persistResource(
newDomainBase("example.xn--q9jyb4c")
.asBuilder()
.setNameservers(ImmutableSet.of(nameserver1.createKey(), nameserver2.createKey()))
.setNameservers(ImmutableSet.of(nameserver1.createVKey(), nameserver2.createVKey()))
.setDsData(
ImmutableSet.of(
DelegationSignerData.create(
@ -158,7 +158,7 @@ public class GenerateDnsReportCommandTest extends CommandTestCase<GenerateDnsRep
persistResource(
newDomainBase("foobar.xn--q9jyb4c")
.asBuilder()
.setNameservers(ImmutableSet.of(nameserver3.createKey(), nameserver4.createKey()))
.setNameservers(ImmutableSet.of(nameserver3.createVKey(), nameserver4.createVKey()))
.build());
// Persist a domain in a different tld that should be ignored.
persistActiveDomain("should-be-ignored.example");

View file

@ -55,7 +55,7 @@ public class UniformRapidSuspensionCommandTest
private void persistDomainWithHosts(HostResource... hosts) {
ImmutableSet.Builder<VKey<HostResource>> hostRefs = new ImmutableSet.Builder<>();
for (HostResource host : hosts) {
hostRefs.add(host.createKey());
hostRefs.add(host.createVKey());
}
persistResource(newDomainBase("evil.tld").asBuilder()
.setNameservers(hostRefs.build())

View file

@ -116,12 +116,12 @@ public class UpdateDomainCommandTest extends EppToolCommandTestCase<UpdateDomain
persistResource(
newDomainBase("example.abc")
.asBuilder()
.setNameservers(ImmutableSet.of(host1.createKey()))
.setNameservers(ImmutableSet.of(host1.createVKey()))
.build());
persistResource(
newDomainBase("example.tld")
.asBuilder()
.setNameservers(ImmutableSet.of(host2.createKey()))
.setNameservers(ImmutableSet.of(host2.createVKey()))
.build());
runCommandForced(
"--client=NewRegistrar", nsParam, "example.abc", "example.tld");
@ -172,7 +172,7 @@ public class UpdateDomainCommandTest extends EppToolCommandTestCase<UpdateDomain
HostResource host1 = persistActiveHost("ns1.zdns.google");
HostResource host2 = persistActiveHost("ns2.zdns.google");
ImmutableSet<VKey<HostResource>> nameservers =
ImmutableSet.of(host1.createKey(), host2.createKey());
ImmutableSet.of(host1.createVKey(), host2.createVKey());
persistResource(
newDomainBase("example.tld").asBuilder().setNameservers(nameservers).build());
runCommandForced(
@ -213,7 +213,7 @@ public class UpdateDomainCommandTest extends EppToolCommandTestCase<UpdateDomain
@Test
public void testSuccess_setStatuses() throws Exception {
HostResource host = persistActiveHost("ns1.zdns.google");
ImmutableSet<VKey<HostResource>> nameservers = ImmutableSet.of(host.createKey());
ImmutableSet<VKey<HostResource>> nameservers = ImmutableSet.of(host.createVKey());
persistResource(
newDomainBase("example.tld")
.asBuilder()
@ -257,7 +257,7 @@ public class UpdateDomainCommandTest extends EppToolCommandTestCase<UpdateDomain
@Test
public void testFailure_cantUpdateRegistryLockedDomainEvenAsSuperuser() {
HostResource host = persistActiveHost("ns1.zdns.google");
ImmutableSet<VKey<HostResource>> nameservers = ImmutableSet.of(host.createKey());
ImmutableSet<VKey<HostResource>> nameservers = ImmutableSet.of(host.createVKey());
persistResource(
newDomainBase("example.tld")
.asBuilder()

View file

@ -68,7 +68,7 @@ public class GenerateZoneFilesActionTest extends MapreduceTestCase<GenerateZoneF
persistResource(newHostResource("ns.bar.tld").asBuilder().addInetAddresses(ips).build());
ImmutableSet<VKey<HostResource>> nameservers =
ImmutableSet.of(host1.createKey(), host2.createKey());
ImmutableSet.of(host1.createVKey(), host2.createVKey());
// This domain will have glue records, because it has a subordinate host which is its own
// nameserver. None of the other domains should have glue records, because their nameservers are
// subordinate to different domains.

View file

@ -220,8 +220,8 @@ public class DomainWhoisResponseTest {
.setEmailAddress("EMAIL@EXAMPLE.tld")
.build());
VKey<HostResource> hostResource1Key = hostResource1.createKey();
VKey<HostResource> hostResource2Key = hostResource2.createKey();
VKey<HostResource> hostResource1Key = hostResource1.createVKey();
VKey<HostResource> hostResource2Key = hostResource2.createVKey();
VKey<ContactResource> registrantResourceKey = registrant.createVKey();
VKey<ContactResource> adminResourceKey = adminContact.createVKey();
VKey<ContactResource> techResourceKey = techContact.createVKey();