EmptyBeanConvenience { public List getThings() { return things; }  List getThings(); void setThings(List things); List<String> getStrings(); void setStrings(List<String> strings); Collection<List<String>> getCollection(); void setCollection(Collection<List<String>> collection); Iterable<Collection<List<String>>> getIterables(); void setIterables(Iterable<Collection<List<String>>> iterables); Set<Iterable<Collection<List<String>>>> getSets(); void setSets(Set<Iterable<Collection<List<String>>>> sets);  }
@Test public void getThings() throws Exception { EmptyBeanConvenience empty = emptyBeanConvenienceBuilder() .collection(emptyList()) .iterables(emptyList()) .sets(emptySet()) .strings(emptyList()) .things(emptyList()); EmptyBeanConvenience notEmpty = emptyBeanConvenienceUpdater(empty) .strings(singletonList("")) .things(singletonList("")) .collection(singletonList(singletonList(""))) .iterables(emptyList()) .sets(emptySet()) .done(); assertThat(empty.getStrings().size(), is(0)); assertThat(empty.getThings().size(), is(0)); assertThat(empty.getCollection().size(), is(0)); assertThat(empty.getSets().size(), is(0)); assertThat(empty.getIterables().iterator().hasNext(), is(false)); assertThat(notEmpty.getStrings().size(), is(1)); assertThat(notEmpty.getThings().size(), is(1)); assertThat(notEmpty.getCollection().size(), is(1)); assertThat(notEmpty.getSets().size(), is(0)); assertThat(notEmpty.getIterables().iterator().hasNext(), is(false)); }