### Question:
LifecycleComponentStack implements LifecycleComponent { @Override public void setExceptionHandler(UncaughtExceptionHandler handler) { components.forEach(component -> component.setExceptionHandler(handler)); } private  LifecycleComponentStack(String name,
                                    ComponentInfoPublisher componentInfoPublisher,
                                    ImmutableList<LifecycleComponent> components); static Builder newBuilder(); @VisibleForTesting int getNumComponents(); @VisibleForTesting LifecycleComponent getComponent(int index); @Override String getName(); @Override Lifecycle.State lifecycleState(); @Override void addLifecycleListener(LifecycleListener listener); @Override void removeLifecycleListener(LifecycleListener listener); @Override void publishInfo(ComponentInfoPublisher componentInfoPublisher); @Override void start(); @Override void stop(); @Override void close(); @Override void setExceptionHandler(UncaughtExceptionHandler handler);  }### Answer:
@Test public void testSetExceptionHandler() { LifecycleComponent component1 = mock(LifecycleComponent.class); LifecycleComponent component2 = mock(LifecycleComponent.class); LifecycleComponentStack stack = LifecycleComponentStack.newBuilder() .withName("set-exception-handler-stack") .addComponent(component1) .addComponent(component2) .build(); UncaughtExceptionHandler handler = mock(UncaughtExceptionHandler.class); stack.setExceptionHandler(handler); verify(component1, times(1)).setExceptionHandler(eq(handler)); verify(component2, times(1)).setExceptionHandler(eq(handler)); }