### Question:
StorageNodeConfigDelegate implements ConfigurationFacet { @Override public Configuration loadResourceConfiguration() throws Exception { Properties properties = new Properties(); properties.load(new FileInputStream(jvmOptsFile)); Configuration config = new Configuration(); String heapDumpOnOOMError = properties.getProperty("heap_dump_on_OOMError"); String heapDumpDir = properties.getProperty("heap_dump_dir"); config.put(new PropertySimple("minHeapSize", getHeapMinProp(properties))); config.put(new PropertySimple("maxHeapSize", getHeapMaxProp(properties))); config.put(new PropertySimple("heapNewSize", getHeapNewProp(properties))); config.put(new PropertySimple("threadStackSize", getStackSizeProp(properties))); if (!StringUtil.isEmpty(heapDumpOnOOMError)) { config.put(new PropertySimple("heapDumpOnOOMError", true)); } else { config.put(new PropertySimple("heapDumpOnOOMError", false)); } if (!StringUtil.isEmpty(heapDumpDir)) { config.put(new PropertySimple("heapDumpDir", heapDumpDir)); } else { File basedir = jvmOptsFile.getParentFile().getParentFile(); config.put(new PropertySimple("heapDumpDir", new File(basedir, "bin").getAbsolutePath())); } ConfigEditor yamlEditor = new ConfigEditor(cassandraYamlFile); yamlEditor.load(); config.put(new PropertySimple("cqlPort", yamlEditor.getNativeTransportPort())); config.put(new PropertySimple("gossipPort", yamlEditor.getStoragePort())); config.put(new PropertySimple("CommitLogLocation", yamlEditor.getCommitLogDirectory())); config.put(new PropertySimple("SavedCachesLocation", yamlEditor.getSavedCachesDirectory())); PropertyList dataFileLocations = new PropertyList("AllDataFileLocations"); for (String s : yamlEditor.getDataFileDirectories()) { dataFileLocations.add(new PropertySimple("directory", s)); } config.put(dataFileLocations); return config; } StorageNodeConfigDelegate(File basedir, OperationFacet invoker); @Override Configuration loadResourceConfiguration(); @Override void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport); void updateResourceConfigurationAndRestartIfNecessary(ConfigurationUpdateReport configurationUpdateReport,
        boolean restartIfNecessary);  }### Answer:
@Test public void loadValidConfig() throws Exception { createDefaultConfig(); Configuration config = configDelegate.loadResourceConfiguration(); assertEquals(config.getSimpleValue("minHeapSize"), "512M", "Failed to load property [minHeapSize]"); assertEquals(config.getSimpleValue("maxHeapSize"), "512M", "Failed to load property [maxHepSize]"); assertEquals(config.getSimpleValue("heapNewSize"), "128M", "Failed to load property [heapNewSize]"); assertEquals(config.getSimpleValue("threadStackSize"), "180", "Failed to load property [threadStackSize]"); assertEquals(config.getSimple("heapDumpOnOOMError").getBooleanValue(), (Boolean) true, "Failed to load property [heapDumpOnOOMError]"); assertEquals(new File(config.getSimpleValue("heapDumpDir")), binDir(), "Failed to load property [heapDumpDir]"); }