@@ -0,0 +1,1106 @@
+package org.flymine.util;%0A%0Aimport junit.framework.*;%0A%0Apublic class StringUtilTest extends TestCase%0A%7B%0A    public StringUtilTest(String arg1) %7B%0A        super(arg1);%0A    %7D%0A%0A    public void testCountOccurancesNullStr() throws Exception %7B%0A        try %7B%0A            StringUtil.countOccurances(null, %22A test string%22);%0A            fail(%22Expected: NullPointerException%22);%0A        %7D%0A        catch (NullPointerException e) %7B%0A        %7D%0A    %7D%0A%0A    public void testCountOccurancesNullTarget() throws Exception %7B%0A        try %7B%0A            StringUtil.countOccurances(%22e%22, null);%0A            fail(%22Expected: NullPointerException%22);%0A        %7D%0A        catch (NullPointerException e) %7B%0A        %7D%0A    %7D%0A%0A    public void testCountOccurances() throws Exception %7B%0A        assertEquals(0,StringUtil.countOccurances(%22z%22, %22A sentence without the required letter in it%22));%0A        assertEquals(8,StringUtil.countOccurances(%22e%22, %22A sentence with the required letter in it%22));%0A        assertEquals(1,StringUtil.countOccurances(%22e%22, %22effffffff%22));%0A        assertEquals(1,StringUtil.countOccurances(%22e%22, %22ffffffffffffff  fffe%22));%0A    %7D%0A%7D%0A

Test class for StringUtil