Skip to content

Commit 661546e

Browse files
committed
chore: fix unit tests
1 parent 559d9ea commit 661546e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/test/java/com/aws/greengrass/tes/TokenExchangeServiceTest.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,7 @@ void GIVEN_token_exchange_service_WHEN_started_with_empty_role_alias_THEN_server
202202
// set mock for port topic
203203
Topic portTopic = mock(Topic.class);
204204
when(portTopic.dflt(anyInt())).thenReturn(portTopic);
205-
when(portTopic.subscribe(any())).thenAnswer((a) -> {
206-
((Subscriber) a.getArgument(0)).published(WhatHappened.initialized, portTopic);
207-
return null;
208-
});
209-
when(portTopic.getOnce()).thenReturn(8080);
210-
211-
205+
212206
when(config.lookup(CONFIGURATION_CONFIG_KEY, PORT_TOPIC)).thenReturn(portTopic);
213207
when(configuration.lookup(SERVICES_NAMESPACE_TOPIC, DEFAULT_NUCLEUS_COMPONENT_NAME, CONFIGURATION_CONFIG_KEY,
214208
IOT_ROLE_ALIAS_TOPIC)).thenReturn(roleTopic);

0 commit comments

Comments
 (0)