@Override
    public T build(ConfigurationSourceProvider provider, String path) throws IOException, ConfigurationException {
        try (InputStream input = provider.open(requireNonNull(path))) {
            final JsonNode node = mapper.readTree(createParser(input));

            if (node == null) {
                throw ConfigurationParsingException
                    .builder("Configuration at " + path + " must not be empty")
                    .build(path);
            }

            return build(node, path);
        } catch (JsonParseException e) {
            throw ConfigurationParsingException
                .builder("Malformed " + formatName)
                .setCause(e)
                .setLocation(e.getLocation())
                .setDetail(e.getMessage())
                .build(path);
        }
    }
@Test
    void loadsValidConfigFiles() throws Exception {
        final Example example = factory.build(configurationSourceProvider, validFile);

        assertThat(example.getName())
                .isEqualTo("Coda Hale");

        assertThat(example.getType())
            .satisfies(type -> assertThat(type).element(0).isEqualTo("coder"))
            .satisfies(type -> assertThat(type).element(1).isEqualTo("wizard"));

        assertThat(example.getProperties())
                .contains(MapEntry.entry("debug", "true"),
                        MapEntry.entry("settings.enabled", "false"));

        assertThat(example.getServers())
            .hasSize(3)
            .element(0)
            .extracting(ExampleServer::getPort)
            .isEqualTo(8080);

    }