@Override
    public ScheduledReporter build(MetricRegistry registry) {
        GraphiteReporter.Builder builder = builder(registry);

        if ("udp".equalsIgnoreCase(transport)) {
            return builder.build(new GraphiteUDP(host, port));
        } else {
            return builder.build(new Graphite(host, port));
        }
    }
@Test
    void testNoAddressResolutionForGraphite() {
        graphiteReporterFactory.build(new MetricRegistry());

        final ArgumentCaptor<Graphite> argument = ArgumentCaptor.forClass(Graphite.class);
        verify(builderSpy).build(argument.capture());

        final Graphite graphite = argument.getValue();
        assertThat(graphite)
            .satisfies(g -> assertThat(g).extracting("hostname").isEqualTo("localhost"))
            .satisfies(g -> assertThat(g).extracting("port").isEqualTo(2003))
            .satisfies(g -> assertThat(g).extracting("address").isNull());
    }