use of com.cloudera.thunderhead.service.usermanagement.UserManagementProto.GetEventGenerationIdsResponse in project cloudbreak by hortonworks.
the class UmsEventGenerationIdsProviderTest method testGetEventGenerationIds.
@Test
void testGetEventGenerationIds() {
GetEventGenerationIdsResponse response = createGetEventGenerationIdsResponse();
when(grpcUmsClient.getEventGenerationIds(any(), any(), any())).thenReturn(response);
UmsEventGenerationIds umsEventGenerationIds = underTest.getEventGenerationIds(ACCOUNT_ID, Optional.of(UUID.randomUUID().toString()));
for (EventMapping eventMapping : EventMapping.values()) {
assertEquals(eventMapping.getConverter().apply(response.getEventGenerationIds()), umsEventGenerationIds.getEventGenerationIds().get(eventMapping.getEventName()));
}
}
Aggregations