class DefaultFixturesStore implements FixturesStore {

    @Override
    public void addLocation(Location location) {
        if (fixtureLocations.contains(location)) {
            logger.debug(location.getDescriptor() + " is already added.");
            return;
        }

        List<File> files = fixtureScanner.scan(location);

        if (files.size() == 0) {
            logger.warn("can not find any fixture file in " + location.getDescriptor());
            return;
        }

        Map<String, FixtureMap> parsed = new HashMap<>();
        for (File file : files) {
            if (fixtureFiles.contains(file)) continue;
            String fixtureStr;
            try {
                fixtureStr = new String(Files.readAllBytes(Paths.get(file.getAbsolutePath())));
            } catch (IOException e) {
                throw new RuntimeException("can not read " + file.getAbsolutePath(), e);
            }
            parsed.putAll(fixtureParser.parse(fixtureStr));
        }

        fixtureFiles.addAll(files);
        fixtureLocations.add(location);
        fixtureMaps.putAll(parsed);
    }

    public  DefaultFixturesStore();
    public  DefaultFixturesStore(FixtureScanner fixtureScanner, FixtureParser fixtureParser);

}