@Test
public void testLoadAndSaveSubstitution() throws IOException {

	String systemKey = "testSystemKey";
	String line = StringBundler.concat("testKey = \"${", systemKey, "}\"");
	String systemValue = "testSystemValue";
	String oldSystemValue = System.getProperty(systemKey);
	System.setProperty(systemKey, systemValue);
	TypedProperties typedProperties = _createTypedProperties(line);
	try {
		Assert.assertEquals(
			"testSystemValue", typedProperties.get("testKey"));
	}
	finally {
		if (oldSystemValue == null) {
			System.clearProperty(systemKey);
		}
		else {
			System.setProperty(systemKey, oldSystemValue);
		}
	}
	_assertSave(typedProperties, line);
}