### Question:
MagicInstantiator implements ObjectInstantiator<T> { public T newInstance() { return instantiator.newInstance(); } MagicInstantiator(Class<T> type); ObjectInstantiator<T> getInstantiator(); T newInstance();  }### Answer:
@Test public void testNewInstance() { ObjectInstantiator<EmptyClass> o1 = new MagicInstantiator<>(EmptyClass.class); assertEquals(EmptyClass.class, o1.newInstance().getClass()); ObjectInstantiator<EmptyClass> o2 = new MagicInstantiator<>(EmptyClass.class); assertEquals(EmptyClass.class, o2.newInstance().getClass()); }