Lazy { public Map<String,String> getMap() { return this.map; } Lazy(Map<String,String> map); Map<String,String> getMap();  }
@Test public void shouldReturnNull() { Lazy item = new LazyBuilder().build(); assertNull(item.getMap()); }
@Test public void shouldRespectWithNullMap() { Lazy item = new LazyBuilder().withMap(null).build(); assertNull(item.getMap()); }
@Test public void shouldRespectWithMap() { Lazy item = new LazyBuilder().withMap(new HashMap<String,String>()).build(); assertNotNull(item.getMap()); assertEquals(0, item.getMap().size()); }
@Test public void shouldRespecAddToMap() { Lazy item = new LazyBuilder().addToMap("foo", "bar").build(); assertNotNull(item.getMap()); assertEquals(1, item.getMap().size()); assertEquals("bar", item.getMap().get("foo")); }