Slice implements Iterable<Value> { public Value get(Attribute field) { return values.getOrDefault(field, defaultValue); } Slice(Value defaultValue); Value get(Attribute field); void set(Attribute field, Value value); @Override Iterator<Value> iterator();  }
@Test public void shouldGetDefaultValueIfUnset() { Slice<String, String> slice = new Slice<>("default"); assertEquals("default", slice.get("foo")); }