public ProjectMeasuresQuery setSort(String sort) {
    this.sort = requireNonNull(sort, "Sort cannot be null");
    return this;
  }
@Test
  public void fail_to_set_null_sort() {
    assertThatThrownBy(() -> underTest.setSort(null))
      .isInstanceOf(NullPointerException.class)
      .hasMessageContaining("Sort cannot be null");
  }