@Test public void testCarInsuranceName() throws IOException { Person p = new Person(); assertEquals("Unknown", p.getCarInsuranceName()); }
public String getCarInsuranceName() { return car .flatMap(Car::getInsurance) .flatMap(Insurance::getName) .orElse("Unknown"); }
Person { public String getCarInsuranceName() { return car .flatMap(Car::getInsurance) .flatMap(Insurance::getName) .orElse("Unknown"); } }
Person { public String getCarInsuranceName() { return car .flatMap(Car::getInsurance) .flatMap(Insurance::getName) .orElse("Unknown"); }  }
Person { public String getCarInsuranceName() { return car .flatMap(Car::getInsurance) .flatMap(Insurance::getName) .orElse("Unknown"); }  String getCarInsuranceName(); }
Person { public String getCarInsuranceName() { return car .flatMap(Car::getInsurance) .flatMap(Insurance::getName) .orElse("Unknown"); }  String getCarInsuranceName();  }