public static TestEnvironmentManager fromPropertiesFile(String testPropertiesResourcePath)
            throws FileNotFoundException {
        InputStream resource = TestEnvironmentManager.class.getClassLoader()
                .getResourceAsStream(testPropertiesResourcePath);
        if (resource == null) {
            throw new FileNotFoundException(
                    "The resource is not found: "
                            + testPropertiesResourcePath);
        }
        YAMLMapper yamlMapper = YAMLMapper.builder()
                .enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS)
                .build();
        JsonNode node;
        try {
            node = yamlMapper.readTree(resource);
        } catch (IOException e) {
            throw new RuntimeException(
                    "Failed to read the resource: "
                            + testPropertiesResourcePath,
                    e);
        }
        for (String propertyName : StringUtils.tokenizeToStringArray(TestProperties.PREFIX, ".")) {
            node = node.get(propertyName);
            if (null == node) {
                // Use default properties if the properties file is found,
                // but it doesn't specify test properties.
                return fromProperties(new TestProperties());
            }
        }
        TestProperties testProperties;
        try {
            testProperties = yamlMapper.treeToValue(node, TestProperties.class);
        } catch (JsonProcessingException e) {
            throw new RuntimeException("Failed to convert to test properties", e);
        }
        return fromProperties(testProperties);
    }
@author James Chen
@implNote Our properties design supports mixing local services with container services, but our
          implementation does NOT fully support just because we don't have these test cases.
turms-server-test-common/src/main/java/im/turms/server/common/testing/environment/TestEnvironmentManager.java