Search in sources :

Example 1 with GetEventGenerationIdsResponse

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()));
    }
}
Also used : UmsEventGenerationIds(com.sequenceiq.freeipa.service.freeipa.user.model.UmsEventGenerationIds) GetEventGenerationIdsResponse(com.cloudera.thunderhead.service.usermanagement.UserManagementProto.GetEventGenerationIdsResponse) Test(org.junit.jupiter.api.Test)

Aggregations

GetEventGenerationIdsResponse (com.cloudera.thunderhead.service.usermanagement.UserManagementProto.GetEventGenerationIdsResponse)1 UmsEventGenerationIds (com.sequenceiq.freeipa.service.freeipa.user.model.UmsEventGenerationIds)1 Test (org.junit.jupiter.api.Test)1