@Override
  public void onProjectBranchesChanged(Set<Project> projects, Set<String> impactedBranches) {
    checkNotNull(projects, "projects can't be null");
    if (projects.isEmpty()) {
      return;
    }

    Arrays.stream(listeners)
      .forEach(safelyCallListener(listener -> listener.onProjectBranchesChanged(projects, impactedBranches)));
  }
@Test
  public void onProjectBranchesChanged_throws_NPE_if_set_is_null() {
    assertThatThrownBy(() -> underTestWithListeners.onProjectBranchesChanged(null, null))
      .isInstanceOf(NullPointerException.class)
      .hasMessage("projects can't be null");
  }