From a6814519d1ae0cd144e9ec4aa8c1098bc3778d37 Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Fri, 27 Apr 2018 11:04:30 +0200 Subject: Rename AthenzService -> ZtsClient --- .../identityprovider/client/AthenzIdentityProviderImplTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vespa-athenz/src/test') diff --git a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImplTest.java b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImplTest.java index 12e60326f97..91c68702e87 100644 --- a/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImplTest.java +++ b/vespa-athenz/src/test/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImplTest.java @@ -58,25 +58,25 @@ public class AthenzIdentityProviderImplTest { @Test public void metrics_updated_on_refresh() throws IOException { IdentityDocumentService identityDocumentService = mock(IdentityDocumentService.class); - AthenzService athenzService = mock(AthenzService.class); + ZtsClient ztsClient = mock(ZtsClient.class); ManualClock clock = new ManualClock(Instant.EPOCH); Metric metric = mock(Metric.class); when(identityDocumentService.getSignedIdentityDocument()).thenReturn(getIdentityDocument()); - when(athenzService.sendInstanceRegisterRequest(any(), any())).then(new Answer() { + when(ztsClient.sendInstanceRegisterRequest(any(), any())).then(new Answer() { @Override public InstanceIdentity answer(InvocationOnMock invocationOnMock) throws Throwable { return new InstanceIdentity(getCertificate(getExpirationSupplier(clock)), "TOKEN"); } }); - when(athenzService.sendInstanceRefreshRequest(anyString(), anyString(), anyString(), anyString(), any(), any(), any())) + when(ztsClient.sendInstanceRefreshRequest(anyString(), anyString(), anyString(), anyString(), any(), any(), any())) .thenThrow(new RuntimeException("#1")) .thenThrow(new RuntimeException("#2")) .thenReturn(new InstanceIdentity(getCertificate(getExpirationSupplier(clock)), "TOKEN")); AthenzCredentialsService credentialService = - new AthenzCredentialsService(IDENTITY_CONFIG, identityDocumentService, athenzService, createDummyTrustStore()); + new AthenzCredentialsService(IDENTITY_CONFIG, identityDocumentService, ztsClient, createDummyTrustStore()); AthenzIdentityProviderImpl identityProvider = new AthenzIdentityProviderImpl(IDENTITY_CONFIG, metric, credentialService, mock(ScheduledExecutorService.class), clock); -- cgit v1.2.3