@Test
void linkStaticPropertiesFile(TemporaryFolder temporaryFolder) throws IOException {

    // Set up static properties file
    File configFolder = temporaryFolder.createDirectory("config");
    File propertiesFile = new File(configFolder, "static.properties");
    Properties staticProps = new OrderedProperties();
    staticProps.setProperty("my.name", "static value");
    staticProps.setProperty("another", "another static value");
    try (OutputStream outputStream = new StripFirstLineStream(new FileOutputStream(propertiesFile))) {
        staticProps.store(outputStream, null);
    }
    // Test
    clusterPropertyLinker.link(bundle, null, temporaryFolder.getRoot());
    assertEquals(2, bundle.getEntities(ClusterProperty.class).size());
    assertEquals(2, bundle.getEntities(GlobalEnvironmentProperty.class).size());
    // static.properties are considered ClusterProperties
    assertEquals("my.name", bundle.getEntities(ClusterProperty.class).get("1").getName());
    assertEquals("another", bundle.getEntities(ClusterProperty.class).get("3").getName());
    // value from static.properties is replaced
    assertEquals("my-value", bundle.getEntities(ClusterProperty.class).get("1").getValue());
    assertEquals("my-value", bundle.getEntities(ClusterProperty.class).get("3").getValue());
    verifyEnvironmentProperties();
}