use of com.sequenceiq.authorization.utils.AuthorizationMessageUtilsService in project cloudbreak by hortonworks.
the class UmsResourceAuthorizationServiceTest method init.
@BeforeEach
public void init() throws IllegalAccessException {
when(resourceNameFactoryService.getNames(any())).thenReturn(Collections.EMPTY_MAP);
this.authorizationMessageUtilsService = spy(new AuthorizationMessageUtilsService(resourceNameFactoryService));
FieldUtils.writeField(underTest, "authorizationMessageUtilsService", authorizationMessageUtilsService, true);
when(umsRightProvider.getRight(any())).thenAnswer(invocation -> {
AuthorizationResourceAction action = invocation.getArgument(0);
return action.getRight();
});
}
Aggregations