when(filterServiceMock.count(eq(EXAMPLE_FILTER_ID)))
.thenReturn((long) 1);
when(filterServiceMock.count(eq(EXAMPLE_FILTER_ID), any(Query.class)))
.thenReturn((long) 1);
doThrow(new NullValueException("No filter found with given id"))
.when(filterServiceMock).singleResult(eq(MockProvider.NON_EXISTING_ID));
doThrow(new NullValueException("No filter found with given id"))
.when(filterServiceMock).singleResult(eq(MockProvider.NON_EXISTING_ID), any(Query.class));
doThrow(new NullValueException("No filter found with given id"))
.when(filterServiceMock).list(eq(MockProvider.NON_EXISTING_ID));
doThrow(new NullValueException("No filter found with given id"))
.when(filterServiceMock).list(eq(MockProvider.NON_EXISTING_ID), any(Query.class));
doThrow(new NullValueException("No filter found with given id"))
.when(filterServiceMock).listPage(eq(MockProvider.NON_EXISTING_ID), anyInt(), anyInt());
doThrow(new NullValueException("No filter found with given id"))
.when(filterServiceMock).listPage(eq(MockProvider.NON_EXISTING_ID), any(Query.class), anyInt(), anyInt());
doThrow(new NullValueException("No filter found with given id"))
.when(filterServiceMock).count(eq(MockProvider.NON_EXISTING_ID));
doThrow(new NullValueException("No filter found with given id"))
.when(filterServiceMock).count(eq(MockProvider.NON_EXISTING_ID), any(Query.class));
doThrow(new NullValueException("No filter found with given id"))
.when(filterServiceMock).deleteFilter(eq(MockProvider.NON_EXISTING_ID));
authorizationServiceMock = mock(AuthorizationServiceImpl.class);
identityServiceMock = mock(IdentityServiceImpl.class);