@Override
  public void addParameterDefinition( String key, String defValue, String description ) throws DuplicateParamException {

    if ( params.get( key ) == null ) {
      OneNamedParam oneParam = new OneNamedParam();

      oneParam.key = key;
      oneParam.defaultValue = defValue;
      oneParam.description = description;
      oneParam.value = "";

      params.put( key, oneParam );
    } else {
      throw new DuplicateParamException( "Duplicate parameter '" + key + "' detected." );
    }
  }
@Test( expected = DuplicateParamException.class )
  public void testAddParameterDefinitionWithException() throws DuplicateParamException {
    namedParams.addParameterDefinition( "key", "value", "description" );
    namedParams.addParameterDefinition( "key", "value", "description" );
  }