@@ -0,0 +1,1518 @@
+package org.flymine.util;%0A%0Aimport java.util.Properties;%0Aimport junit.framework.*;%0A%0Apublic class PropertiesUtilTest extends TestCase%0A%7B%0A    Properties props;%0A%0A    public PropertiesUtilTest(String arg1) %7B%0A        super(arg1);%0A    %7D%0A%0A    public void setUp() throws Exception %7B%0A        props = new Properties();%0A        props.put(%22testprop.name%22, %22myname%22);%0A        props.put(%22testprop.address%22, %22myaddress%22);%0A        props.put(%22anotherprop.address%22, %22anotheraddress%22);%0A    %7D%0A%0A    public void testStartingWithNullStr() throws Exception %7B%0A        try %7B%0A            PropertiesUtil.getPropertiesStartingWith(null, new Properties());%0A            fail(%22Expected: NullPointerException%22);%0A        %7D%0A        catch (NullPointerException e) %7B%0A        %7D%0A    %7D%0A%0A    public void testStartingWithNullProperties() throws Exception %7B%0A        try %7B%0A            PropertiesUtil.getPropertiesStartingWith(%22blahblah%22, null);%0A            fail(%22Expected: NullPointerException%22);%0A        %7D%0A        catch (NullPointerException e) %7B%0A        %7D%0A    %7D%0A%0A    public void testStartingWithExists() throws Exception %7B%0A%0A        Properties p = PropertiesUtil.getPropertiesStartingWith(%22testprop%22, props);%0A%0A        assertEquals(2, p.size());%0A        assertEquals(%22myname%22, p.get(%22testprop.name%22));%0A        assertEquals(%22myaddress%22, p.get(%22testprop.address%22));%0A%0A    %7D%0A%0A    public void testStartingWithNotExists() throws Exception %7B%0A%0A        Properties p = PropertiesUtil.getPropertiesStartingWith(%22nothing%22, props);%0A%0A        assertEquals(0, p.size());%0A    %7D%0A%0A%7D%0A

Test class for PropertiesUtil