### Question:
GiantModel { public void setNourishment(Nourishment nourishment) { this.nourishment = nourishment; } GiantModel(Health health, Fatigue fatigue, Nourishment nourishment); Health getHealth(); void setHealth(Health health); Fatigue getFatigue(); void setFatigue(Fatigue fatigue); Nourishment getNourishment(); void setNourishment(Nourishment nourishment); @Override String toString();  }### Answer:
@Test public void testSetNourishment() { final var model = new GiantModel(Health.HEALTHY, Fatigue.ALERT, Nourishment.SATURATED); assertEquals(Nourishment.SATURATED, model.getNourishment()); var messageFormat = "The giant looks healthy, alert and %s."; for (final var nourishment : Nourishment.values()) { model.setNourishment(nourishment); assertEquals(nourishment, model.getNourishment()); assertEquals(String.format(messageFormat, nourishment), model.toString()); } }
@Test public void testSetNourishment() { final GiantModel model = new GiantModel(Health.HEALTHY, Fatigue.ALERT, Nourishment.SATURATED); assertEquals(Nourishment.SATURATED, model.getNourishment()); for (final Nourishment nourishment : Nourishment.values()) { model.setNourishment(nourishment); assertEquals(nourishment, model.getNourishment()); assertEquals("The giant looks healthy, alert and " + nourishment.toString() + ".", model.toString()); } }