public static int getOccurenceString( String string, String searchFor ) {
    if ( string == null || string.length() == 0 ) {
      return 0;
    }
    int counter = 0;
    int len = searchFor.length();
    if ( len > 0 ) {
      int start = string.indexOf( searchFor );
      while ( start != -1 ) {
        counter++;
        start = string.indexOf( searchFor, start + len );
      }
    }
    return counter;
  }
@Test
  public void testGetOccurenceString() {
    assertEquals( 0, Const.getOccurenceString( "", "" ) );
    assertEquals( 0, Const.getOccurenceString( "foo bar bazfoo", "cat" ) );
    assertEquals( 2, Const.getOccurenceString( "foo bar bazfoo", "foo" ) );
  }