static String effectiveServices(File servicesFile, ZoneId zone, CloudName cloud, InstanceName instance, Tags tags) throws Exception {
        Document processedServicesXml = new XmlPreProcessor(servicesFile.getParentFile(),
                                                            servicesFile,
                                                            instance,
                                                            zone.environment(),
                                                            zone.region(),
                                                            cloud,
                                                            tags)
                .run();
        Transformer transformer = TransformerFactory.newInstance().newTransformer();
        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
        Writer writer = new StringWriter();
        transformer.transform(new DOMSource(processedServicesXml), new StreamResult(writer));
        return writer.toString().replaceAll("\n(\\s*\n)+","\n");
    }
@Test
    @DisplayName("when zone matches environment-only directive")
    void devServices() throws Exception {
        assertEquals(Files.readString(Paths.get("src/test/resources/effective-services/dev.xml")),
                     effectiveServices(servicesFile, ZoneId.from("dev", "us-east-3"), CloudName.DEFAULT, InstanceName.defaultName(), Tags.empty()));
    }