### Question:
PropertyReader { public static InputStream locateClassPathResource( final ServletContext context, final String resourceName ) { InputStream result; String currResourceLocation; if( StringUtils.isEmpty( resourceName ) ) { return null; } currResourceLocation = createResourceLocation( "/WEB-INF/classes", resourceName ); result = context.getResourceAsStream( currResourceLocation ); if( result != null ) { LOG.debug( " Successfully located the following classpath resource : " + currResourceLocation ); return result; } currResourceLocation = createResourceLocation( "", resourceName ); result = PropertyReader.class.getResourceAsStream( currResourceLocation ); if( result != null ) { LOG.debug( " Successfully located the following classpath resource : " + currResourceLocation ); return result; } LOG.debug( " Unable to resolve the following classpath resource : " + resourceName ); return result; } private  PropertyReader(); static Properties loadWebAppProps( final ServletContext context ); static Properties getDefaultProperties(); static Properties getCombinedProperties( final String fileName ); static void expandVars( final Properties properties ); static InputStream locateClassPathResource( final ServletContext context, final String resourceName ); static final String DEFAULT_JSPWIKI_CONFIG; static final String PARAM_CUSTOMCONFIG; static final String PARAM_CUSTOMCONFIG_CASCADEPREFIX; static final String CUSTOM_JSPWIKI_CONFIG; }### Answer:
@Test public void testLocateClassPathResource() { Assertions.assertEquals( "/ini/jspwiki.properties", PropertyReader.createResourceLocation( "ini", "jspwiki.properties" ) ); Assertions.assertEquals( "/ini/jspwiki.properties", PropertyReader.createResourceLocation( null, "ini/jspwiki.properties" ) ); Assertions.assertEquals( "/ini/jspwiki.properties", PropertyReader.createResourceLocation( null, "/ini/jspwiki.properties" ) ); Assertions.assertEquals( "/jspwiki-custom.properties", PropertyReader.createResourceLocation( null, "/jspwiki-custom.properties" ) ); Assertions.assertEquals( "/jspwiki.custom.cascade.1.ini", PropertyReader.createResourceLocation( null, "jspwiki.custom.cascade.1.ini" ) ); Assertions.assertEquals( "/WEB-INF/classes/jspwiki-custom.properties", PropertyReader.createResourceLocation( "WEB-INF/classes", PropertyReader.CUSTOM_JSPWIKI_CONFIG ) ); Assertions.assertEquals( "/WEB-INF/classes/jspwiki-custom.properties", PropertyReader.createResourceLocation( "/WEB-INF/classes", PropertyReader.CUSTOM_JSPWIKI_CONFIG ) ); Assertions.assertEquals( "/WEB-INF/classes/jspwiki-custom.properties", PropertyReader.createResourceLocation( "/WEB-INF/classes/", PropertyReader.CUSTOM_JSPWIKI_CONFIG ) ); }