### Question:
RefTo extends Ref<DATA> { final Ref<DATA> whenAbsent(Func0<DATA> defaultSupplier) { return this; } RefTo(Class<DATA> dataClass); final int hashCode(); final boolean equals(Object another); static final Ref<IProvideDefault> defaultProvider; }### Answer:
@Test public void testWhenAbsent() { val r = Ref.of(Person.class) .whenAbsentUseTypeDefault() .defaultTo(new Person(new SuperCar())); assertEquals("SUPER FLASH!!!!", r.value() .zoom() .toString()); val zoom = With(r.butFrom(()->null)) .run(()->{ return r.value() .zoom(); }); assertEquals("FLASH!", zoom); }