### Question:
BeanWrapper implements Bean<T>, PassivationCapable { @Override public Set<Type> getTypes() { final Set<Type> types = new HashSet<>(); types.add(clazz); types.add(Object.class); return types; } BeanWrapper(final Class<T> clazz, final Supplier<T> supplier);  BeanWrapper(final String name, final Class<T> clazz, final Supplier<T> supplier); @Override T create(final CreationalContext<T> context); @Override // Mark: Is this correct? Should I be doing something additional? void destroy(T instance, final CreationalContext<T> context); @Override String getName(); @SuppressWarnings("serial") @Override Set<Annotation> getQualifiers(); @Override Class<? extends Annotation> getScope(); @Override Set<Class<? extends Annotation>> getStereotypes(); @Override Set<Type> getTypes(); @Override Class<?> getBeanClass(); @Override Set<InjectionPoint> getInjectionPoints(); @Override boolean isAlternative(); @Override boolean isNullable(); @Override // Mark: Is this sufficiently unique? Will this wrapper actually ever // get serialized? Is this supposed to be the ID of the underlying // bean instance or just this bean definition? String getId();  }### Answer:
@Test public void testGetTypes() { assertEquals(new HashSet<>(Arrays.asList(Foo.class, Object.class)), testee.getTypes()); }