public String sanitizeConnectionName( String connectionName ) {
    return Const.NVL( connectionName, "" )
      .replaceAll( "[" + Pattern.quote( CONNECTION_NAME_INVALID_CHARACTERS ) + "]", "" );
  }
@Test
  public void testSanitizeConnectionNameRemovesInvalidCharacters() {
    String sanitizedName = fileNameParser.sanitizeConnectionName(
      "connection"
        + CONNECTION_NAME_INVALID_CHARACTERS
        + ACCEPTED_CHARACTERS_FULL_SET
        + "name" );

    for ( char c : CONNECTION_NAME_INVALID_CHARACTERS.toCharArray() ) {
      assertFalse( sanitizedName.indexOf( c ) >= 0 );
    }
  }