### Question:
InvestorRole extends CustomerRole { public String invest() { return String.format("Investor %s has invested %d dollars", name, amountToInvest); }  String getName(); void setName(String name); long getAmountToInvest(); void setAmountToInvest(long amountToInvest); String invest();  }### Answer:
@Test public void investTest() { var investorRole = new InvestorRole(); investorRole.setName("test"); investorRole.setAmountToInvest(10); Assert.assertEquals(investorRole.invest(), "Investor test has invested 10 dollars"); }