private static void assertConfigFileContains(File application, Map<String, File> files,
                                                 String fileName, ConfigInstance config) throws IOException {
        String configString = config.toString();
        if (WRITE_FILES) {
            files.put(fileName, writeFile(application, fileName, configString.trim() + "\n"));
        }
        if (!files.containsKey(fileName)) {
            fail("Expected file '" + fileName + "' not found.");
            return;
        }
        assertSerializedConfigEquals(IOUtils.readFile(files.get(fileName)), configString, false);
    }
Tests whether or not a given file exists and contains some expected content.

@param application     The application directory.
@param files           The filtered list of files within the application.
@param fileName        The name of the file whose content to check.
@param config          The config required in the file being checked.
@throws IOException
config-model/src/test/java/com/yahoo/vespa/model/routing/test/RoutingTestCase.java