public static WebService.NewParam createRootQualifierParameter(WebService.NewAction action, QualifierParameterContext context) {
    return action.createParam(PARAM_QUALIFIER)
      .setDescription("Project qualifier. Filter the results with the specified qualifier. Possible values are:" + buildRootQualifiersDescription(context))
      .setPossibleValues(getRootQualifiers(context.getResourceTypes()));
  }
@Test
  public void test_createRootQualifierParameter() {
    when(resourceTypes.getRoots()).thenReturn(asList(Q1, Q2));
    when(newAction.createParam(PARAM_QUALIFIER)).thenReturn(newParam);
    when(newParam.setDescription(startsWith("Project qualifier. Filter the results with the specified qualifier. "
      + "Possible values are:"
      + "<ul><li>Q1 - null</li>"
      + "<li>Q2 - null</li></ul>"))).thenReturn(newParam);
    when(newParam.setPossibleValues(any(Collection.class))).thenReturn(newParam);
    NewParam newParam = WsParameterBuilder
      .createRootQualifierParameter(newAction, newQualifierParameterContext(i18n, resourceTypes));

    assertThat(newParam).isNotNull();
  }