AbstractUnwrappable implements Unwrappable { @Override public T unwrap() { return delegate; } protected  AbstractUnwrappable(T delegate); @Override final U as(Class<U> type); @Override T unwrap(); @Override String toString();  }
@Test void testUnwrap() { final Foo foo = new Foo(); assertThat(foo.unwrap()).isSameAs(foo); final Bar<Foo> bar = new Bar<>(foo); assertThat(bar.unwrap()).isSameAs(foo); final Qux<Bar<Foo>> qux = new Qux<>(bar); assertThat(qux.unwrap()).isSameAs(bar); assertThat(qux.unwrap().unwrap()).isSameAs(foo); }