Eager { public List<Thing> getList() { return this.list; } Eager(List<Thing> list); List<Thing> getList();  }
@Test public void shouldReturnEmpty() { Eager item = new EagerBuilder().build(); assertNotNull(item.getList()); assertEquals(0, item.getList().size()); }
@Test public void shouldRespectWithNull() { Eager item = new EagerBuilder().withList((List<Thing>)null).build(); assertNull(item.getList()); }
@Test public void shouldRespectWithList() { Eager item = new EagerBuilder().withList(new ArrayList<Thing>()).build(); assertNotNull(item.getList()); assertEquals(0, item.getList().size()); }
@Test public void shouldRespecAddToList() { Eager item = new EagerBuilder().addToList(new Thing(1, "foo")).build(); assertNotNull(item.getList()); assertEquals(1, item.getList().size()); assertEquals("foo", item.getList().get(0).getName()); }