@Test public void testDrink() { final Stew stew = new Stew(1, 2, 3, 4); stew.mix(); assertEquals("Mixing the stew we find: 1 potatoes, 2 carrots, 3 meat and 4 peppers", appender.getLastMessage()); stew.taste(); assertEquals("Tasting the stew", appender.getLastMessage()); stew.mix(); assertEquals("Mixing the stew we find: 0 potatoes, 1 carrots, 2 meat and 3 peppers", appender.getLastMessage()); }
public void mix() { LOGGER.info("Mixing the immutable stew we find: {} potatoes, {} carrots, {} meat and {} peppers", data.getNumPotatoes(), data.getNumCarrots(), data.getNumMeat(), data.getNumPeppers()); }
ImmutableStew { public void mix() { LOGGER.info("Mixing the immutable stew we find: {} potatoes, {} carrots, {} meat and {} peppers", data.getNumPotatoes(), data.getNumCarrots(), data.getNumMeat(), data.getNumPeppers()); } }
ImmutableStew { public void mix() { LOGGER.info("Mixing the immutable stew we find: {} potatoes, {} carrots, {} meat and {} peppers", data.getNumPotatoes(), data.getNumCarrots(), data.getNumMeat(), data.getNumPeppers()); } ImmutableStew(int numPotatoes, int numCarrots, int numMeat, int numPeppers); }
ImmutableStew { public void mix() { LOGGER.info("Mixing the immutable stew we find: {} potatoes, {} carrots, {} meat and {} peppers", data.getNumPotatoes(), data.getNumCarrots(), data.getNumMeat(), data.getNumPeppers()); } ImmutableStew(int numPotatoes, int numCarrots, int numMeat, int numPeppers); void mix(); }
ImmutableStew { public void mix() { LOGGER.info("Mixing the immutable stew we find: {} potatoes, {} carrots, {} meat and {} peppers", data.getNumPotatoes(), data.getNumCarrots(), data.getNumMeat(), data.getNumPeppers()); } ImmutableStew(int numPotatoes, int numCarrots, int numMeat, int numPeppers); void mix();  }