@Test
public void testPropertiesFiles() throws Exception {

    FakeConfiguration fake = (FakeConfiguration) config;
    File testRackDcFile = new File("src/test/resources/conf/cassandra-rackdc.properties");
    File testYamlFile = new File("src/main/resources/incr-restore-cassandra.yaml");
    String propertiesPath = new File(config.getYamlLocation()).getParentFile().getPath();
    File rackDcFile =
            new File(
                    Paths.get(propertiesPath, "cassandra-rackdc.properties")
                            .normalize()
                            .toString());
    File configFile =
            new File(Paths.get(propertiesPath, "properties_test.yaml").normalize().toString());
    System.out.println(testRackDcFile);
    System.out.println(rackDcFile);
    Files.copy(testRackDcFile, rackDcFile);
    Files.copy(testYamlFile, configFile);
    try {
        fake.fakeProperties.put(
                "propertyOverrides.cassandra-rackdc",
                "dc=${dc},rack=${rac},ec2_naming_scheme=legacy,dc_suffix=testsuffix");
        tuner.writeAllProperties(configFile.getPath(), "your_host", "YourSeedProvider");
        Properties prop = new Properties();
        prop.load(new FileReader(rackDcFile));
        assertEquals("us-east-1", prop.getProperty("dc"));
        assertEquals("my_zone", prop.getProperty("rack"));
        assertEquals("legacy", prop.getProperty("ec2_naming_scheme"));
        assertEquals("testsuffix", prop.getProperty("dc_suffix"));
        assertEquals(4, prop.stringPropertyNames().size());
    } finally {
        fake.fakeProperties.clear();
        for (String line : Files.readLines(rackDcFile, Charset.defaultCharset())) {
            System.out.println(line);
        }
        Files.copy(testRackDcFile, rackDcFile);
        Files.copy(testYamlFile, configFile);
    }
}