### Question:
PropertyLoader { public Resource[] constructResourceList() { String configHost = System.getProperties().getProperty(DEFAULT_CONFIG_HOST_PROPERTY); if (configHost == null) { log("No config Host defined - assuming " + DEFAULT_CONFIG_HOST_PROPERTY_VALUE); configHost = DEFAULT_CONFIG_HOST_PROPERTY_VALUE; } DefaultResourceLoader loader = new DefaultResourceLoader(); Resource configOverrideResource = loader.getResource(configHost + configOverride); return handleConfig(defaultConfig, appProperties, configOverrideResource); } PropertyLoader(Resource defaultConfig, String configOverride);  PropertyLoader(Resource defaultConfig, String configOverride, Logger logger); Properties buildConsolidatedProperties(); Resource[] constructResourceList();  }### Answer:
@Test public void ResourceConstructorTest() throws IOException{ PropertyLoader pl = new PropertyLoader(mockResource, "overrides.properties"); Resource[] resources = pl.constructResourceList(); assertNotNull(resources); assertEquals(1, resources.length); }
@Test public void ResourceConstructorWithFileSystemResourceTest() throws IOException{ System.getProperties().setProperty("betfair.config.host", ""); String os = System.getProperty("os.name"); String tempDir = "/tmp/"; if (os.contains("Windows")) { tempDir = System.getProperty("java.io.tmpdir"); } String filePath = tempDir+"test-overrides.properties"; File file = new File(filePath); file.createNewFile(); file.deleteOnExit(); PropertyLoader pl = new PropertyLoader(mockResource, "file:"+filePath); Resource[] resources = pl.constructResourceList(); assertNotNull(resources); assertEquals(2, resources.length); }
@Test public void ResourceConstructorWithClassPathResourceTest() throws IOException{ System.getProperties().setProperty("betfair.config.host", ""); PropertyLoader pl = new PropertyLoader(mockResource, "classpath:test-overrides.properties"); Resource[] resources = pl.constructResourceList(); assertNotNull(resources); assertEquals(2, resources.length); }