### Question:
ComponentGroupImpl implements ComponentGroup { @Override public Optional<String> getIp() { return ofNullable(ip); }  @Override Optional<String> getIp(); @Override Optional<Component> findComponentWithName(String componentName); @Override String toString();  }### Answer:
@Test void ipOptionalWrapping() { ComponentGroup nullableIp = new ComponentGroupImpl("null", null, components); assertEquals(empty(), nullableIp.getIp()); String ip = "127.0.0.1"; ComponentGroup ipGroup = new ComponentGroupImpl("group", ip, components); assertEquals(of(ip), ipGroup.getIp()); }