### Question:
Utils { public static <T> void inject(Object target, Class<T> injectableType, T injectableInstance) { inject0(target, injectableType, injectableInstance); } private  Utils(); static void inject(Object target, Class<T> injectableType, T injectableInstance); static void inject0(Object target, Class<?> injectableType, Object injectableInstance); static void injectAll(Object target, Map<Class<?>, Object> injectables);  }### Answer:
@Test public void shouldInjectExactTypeMatch() { Injectable injectable = new Injectable(); InjectionTargetForExactTypeMatch injectionTarget = new InjectionTargetForExactTypeMatch(); Utils.inject(injectionTarget, Injectable.class, injectable); assertSame(injectable, injectionTarget.injectable); }
@Test public void shouldInjectSuperTypeMatch() { InjectableSubType injectable = new InjectableSubType(); InjectionTargetForSuperTypeMatch injectionTarget = new InjectionTargetForSuperTypeMatch(); Utils.inject(injectionTarget, InjectableSubType.class, injectable); assertSame(injectable, injectionTarget.injectable); }