### Question:
DimensionConfigurationInitializer { static Properties readDimensionProperties(Configuration configuration) { final String configFilePath = configuration.getStringValue(Configuration.KEY_MMS_MMD_DIMENSIONS); final Properties properties = new Properties(); try { properties.load(new FileInputStream(configFilePath)); } catch (FileNotFoundException e) { throw new ToolException(e.getMessage(), e, ToolException.CONFIGURATION_FILE_NOT_FOUND_ERROR); } catch (IOException e) { throw new ToolException(e.getMessage(), e, ToolException.CONFIGURATION_FILE_IO_ERROR); } return properties; }  static Map<String, Integer> initialize(Collection<String> dimensionNames, Configuration configuration);  }### Answer:
@Test public void testReadDimensionProperties() { final String dimensionFilePath = TestHelper.getResourcePath(getClass(), "dimension.properties"); final Configuration config = new Configuration(); config.put(Configuration.KEY_MMS_MMD_DIMENSIONS, dimensionFilePath); final Properties dimensionProperties = DimensionConfigurationInitializer.readDimensionProperties(config); assertNotNull(dimensionProperties); assertEquals("unlimited", dimensionProperties.getProperty("matchup")); assertEquals("80", dimensionProperties.getProperty("filename_length")); }
@Test public void testReadDimensionProperties_missingConfigValue() { final Configuration config = new Configuration(); try { DimensionConfigurationInitializer.readDimensionProperties(config); fail("ToolException expected"); } catch (ToolException expected) { } }