### Question:
TieredFeatureToggleVersion implements Service { @Override public String getWelcomeMessage(User user) { if (UserGroup.isPaid(user)) { return "You're amazing " + user + ". Thanks for paying for this awesome software."; } return "I suppose you can use this software."; }  @Override String getWelcomeMessage(User user); @Override boolean isEnhanced();  }### Answer:
@Test public void testGetWelcomeMessageForPaidUser() { final String welcomeMessage = service.getWelcomeMessage(paidUser); final String expected = "You're amazing Jamie Coder. Thanks for paying for this awesome software."; assertEquals(expected, welcomeMessage); }
@Test public void testGetWelcomeMessageForFreeUser() { final String welcomeMessage = service.getWelcomeMessage(freeUser); final String expected = "I suppose you can use this software."; assertEquals(expected, welcomeMessage); }
@Test public void testGetWelcomeMessageForPaidUser() { final var welcomeMessage = service.getWelcomeMessage(paidUser); final var expected = "You're amazing Jamie Coder. Thanks for paying for this awesome software."; assertEquals(expected, welcomeMessage); }
@Test public void testGetWelcomeMessageForFreeUser() { final var welcomeMessage = service.getWelcomeMessage(freeUser); final var expected = "I suppose you can use this software."; assertEquals(expected, welcomeMessage); }
@Test public void testGetWelcomeMessageForPaidUser() throws Exception { final String welcomeMessage = service.getWelcomeMessage(paidUser); final String expected = "You're amazing Jamie Coder. Thanks for paying for this awesome software."; assertEquals(expected, welcomeMessage); }
@Test public void testGetWelcomeMessageForFreeUser() throws Exception { final String welcomeMessage = service.getWelcomeMessage(freeUser); final String expected = "I suppose you can use this software."; assertEquals(expected, welcomeMessage); }