@Test
void should_ThrowError_When_ConsumerRaisesException() throws Exception {

  MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
  map.put(QueryHelper.SORT_BY, Collections.singletonList("1"));
  MockBiConsumer consumer = mock(MockBiConsumer.class);
  doThrow(new InvalidArgumentException("")).when(consumer).accept(any(), any());
  assertThatThrownBy(() -> applyAndRemoveSortingParams(map, consumer))
      .isInstanceOf(InvalidArgumentException.class);
}