### Question:
LifecycleComponentStack implements LifecycleComponent { @Override public String getName() { return name; } 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 testGetName() { String name = "test-get-name"; LifecycleComponentStack stack = LifecycleComponentStack.newBuilder() .withName(name) .addComponent(mock(LifecycleComponent.class)) .build(); assertEquals(name, stack.getName()); }