@Override
  public void register(String qpKey, Status status) {
    checkNotNull(qpKey, "qpKey can't be null");
    checkNotNull(status, "status can't be null");
    checkState(statuses.put(qpKey, status) == null, "Quality Profile '%s' is already registered", qpKey);
  }
@Test
  @UseDataProvider("qualityProfileStatuses")
  public void register_fails_with_ISE_if_qp_is_already_registered(QProfileStatusRepository.Status status) {
    underTest.register("key", status);

    assertThatThrownBy(() -> underTest.register("key", status))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("Quality Profile 'key' is already registered");
  }