use of org.zalando.nakadi.domain.ResourceAuthorizationAttribute in project nakadi by zalando.
the class EventTypeControllerTest method whenPostAndAuthorizationInvalidThen422.
@Test
public void whenPostAndAuthorizationInvalidThen422() throws Exception {
final EventType eventType = buildDefaultEventType();
eventType.setAuthorization(new ResourceAuthorization(ImmutableList.of(new ResourceAuthorizationAttribute("type1", "value1")), ImmutableList.of(new ResourceAuthorizationAttribute("type2", "value2")), ImmutableList.of(new ResourceAuthorizationAttribute("type3", "value3"))));
doThrow(new UnableProcessException("dummy")).when(authorizationValidator).validateAuthorization(any());
postETAndExpect422WithProblem(eventType, Problem.valueOf(MoreStatus.UNPROCESSABLE_ENTITY, "dummy"));
}
Aggregations