@Test public void testSingletonImpl() { NavigationPropertyBinding navigation = new NavigationPropertyBindingImpl("path", "target"); SingletonImpl singleton = new SingletonImpl.Builder() .setName("singleton") .setTypeName("Singleton") .addNavigationPropertyBinding(navigation) .addNavigationPropertyBindings(Arrays.asList(navigation, navigation)) .build(); assertThat(singleton.getName(), is("singleton")); assertThat(singleton.toString(), is("singleton")); assertThat(singleton.getTypeName(), is("Singleton")); assertThat(singleton.getNavigationPropertyBindings().size(), is(3)); for (NavigationPropertyBinding property : singleton.getNavigationPropertyBindings()) { assertThat(property.getPath(), is("path")); assertThat(property.getTarget(), is("target")); } }
private SingletonImpl(Builder builder) { this.name = builder.name; this.typeName = builder.typeName; this.navigationPropertyBindings = Collections.unmodifiableList(builder.navPropertyBindBuilder); }
SingletonImpl implements Singleton { private SingletonImpl(Builder builder) { this.name = builder.name; this.typeName = builder.typeName; this.navigationPropertyBindings = Collections.unmodifiableList(builder.navPropertyBindBuilder); } }
SingletonImpl implements Singleton { private SingletonImpl(Builder builder) { this.name = builder.name; this.typeName = builder.typeName; this.navigationPropertyBindings = Collections.unmodifiableList(builder.navPropertyBindBuilder); } private  SingletonImpl(Builder builder); }
SingletonImpl implements Singleton { private SingletonImpl(Builder builder) { this.name = builder.name; this.typeName = builder.typeName; this.navigationPropertyBindings = Collections.unmodifiableList(builder.navPropertyBindBuilder); } private  SingletonImpl(Builder builder); @Override String getName(); @Override String getTypeName(); @Override List<NavigationPropertyBinding> getNavigationPropertyBindings(); @Override String toString(); }
SingletonImpl implements Singleton { private SingletonImpl(Builder builder) { this.name = builder.name; this.typeName = builder.typeName; this.navigationPropertyBindings = Collections.unmodifiableList(builder.navPropertyBindBuilder); } private  SingletonImpl(Builder builder); @Override String getName(); @Override String getTypeName(); @Override List<NavigationPropertyBinding> getNavigationPropertyBindings(); @Override String toString();  }