### Question:
ComponentLifeRegistry { public void register(String name, ComponentLife componentLife) { componentLifeTreeSet.add(componentLife); if (!name.equals(ComponentLife.class.getCanonicalName())) { componentApplicationHashMap.put(name, componentLife); } componentApplicationHashMap.put(componentLife.getClass().getCanonicalName(), componentLife); } ComponentLifeRegistry(); void registerFromManifest(Application application); void register(String name, ComponentLife componentLife); T search(Class<T> clasz); Iterable<ComponentLife> getAll();  }### Answer:
@Test public void lifeCycleInvoke() { aApplication = Mockito.mock(MockComponentALife.class); bApplication = Mockito.mock(MockComponentBLife.class); componentLifeRegistry.register("aApplication", aApplication); componentLifeRegistry.register("bApplication", bApplication); }