### Question:
ComponentGroupImpl implements ComponentGroup { @Override public String toString() { return name + ": " + components; }  @Override Optional<String> getIp(); @Override Optional<Component> findComponentWithName(String componentName); @Override String toString();  }### Answer:
@Test void string() { when(components.toString()).thenReturn("[]"); ComponentGroup group = new ComponentGroupImpl("groupName", null, components); assertEquals("groupName: []", group.toString()); }