public static int indexOfName( String[] databaseNames, String name ) {
    if ( databaseNames == null || name == null ) {
      return -1;
    }

    for ( int i = 0; i < databaseNames.length; i++ ) {
      String databaseName = databaseNames[ i ];
      if ( name.equalsIgnoreCase( databaseName ) ) {
        return i;
      }
    }

    return -1;
  }
@Test
  public void indexOfName_NonExactMatch() {
    assertEquals( 1, DatabaseMeta.indexOfName( new String[] { "a", "b", "c" }, "B" ) );
  }