@Test public void testConfigurationBuilder() { NetworkFactory nf = new NetworkFactory(); Configuration.Builder cb = nf.configurationBuilder().setConfigurationFormat(CONFIG_FORMAT); Configuration c1 = cb.build(); Configuration c2 = cb.build(); assertThat(c1.getHostname(), is(notNullValue())); assertThat(c2.getHostname(), is(notNullValue())); assertThat(c1.getHostname(), not(equalTo(c2.getHostname()))); }
public Configuration.Builder configurationBuilder() { return Configuration.builder(() -> generateName(Configuration.class)); }
NetworkFactory { public Configuration.Builder configurationBuilder() { return Configuration.builder(() -> generateName(Configuration.class)); } }
NetworkFactory { public Configuration.Builder configurationBuilder() { return Configuration.builder(() -> generateName(Configuration.class)); } NetworkFactory(); }
NetworkFactory { public Configuration.Builder configurationBuilder() { return Configuration.builder(() -> generateName(Configuration.class)); } NetworkFactory(); IpAccessList.Builder aclBuilder(); BgpActivePeerConfig.Builder bgpNeighborBuilder(); BgpPassivePeerConfig.Builder bgpDynamicNeighborBuilder(); BgpProcess.Builder bgpProcessBuilder(); Configuration.Builder configurationBuilder(); Interface.Builder interfaceBuilder(); OspfArea.Builder ospfAreaBuilder(); OspfProcess.Builder ospfProcessBuilder(); RipProcess.Builder ripProcessBuilder(); @VisibleForTesting RoutingPolicy.Builder routingPolicyBuilder(); Vrf.Builder vrfBuilder(); }
NetworkFactory { public Configuration.Builder configurationBuilder() { return Configuration.builder(() -> generateName(Configuration.class)); } NetworkFactory(); IpAccessList.Builder aclBuilder(); BgpActivePeerConfig.Builder bgpNeighborBuilder(); BgpPassivePeerConfig.Builder bgpDynamicNeighborBuilder(); BgpProcess.Builder bgpProcessBuilder(); Configuration.Builder configurationBuilder(); Interface.Builder interfaceBuilder(); OspfArea.Builder ospfAreaBuilder(); OspfProcess.Builder ospfProcessBuilder(); RipProcess.Builder ripProcessBuilder(); @VisibleForTesting RoutingPolicy.Builder routingPolicyBuilder(); Vrf.Builder vrfBuilder();  }