@Test public void testMix() { final ImmutableStew stew = new ImmutableStew(1, 2, 3, 4); final String expectedMessage = "Mixing the immutable stew we find: 1 potatoes, " + "2 carrots, 3 meat and 4 peppers"; for (int i = 0; i < 20; i++) { stew.mix(); assertEquals(expectedMessage, appender.getLastMessage()); } assertEquals(20, appender.getLogSize()); }
public void mix() { LOGGER.info("Mixing the stew we find: {} potatoes, {} carrots, {} meat and {} peppers", numPotatoes, numCarrots, numMeat, numPeppers); }
Stew { public void mix() { LOGGER.info("Mixing the stew we find: {} potatoes, {} carrots, {} meat and {} peppers", numPotatoes, numCarrots, numMeat, numPeppers); } }
Stew { public void mix() { LOGGER.info("Mixing the stew we find: {} potatoes, {} carrots, {} meat and {} peppers", numPotatoes, numCarrots, numMeat, numPeppers); } Stew(int numPotatoes, int numCarrots, int numMeat, int numPeppers); }
Stew { public void mix() { LOGGER.info("Mixing the stew we find: {} potatoes, {} carrots, {} meat and {} peppers", numPotatoes, numCarrots, numMeat, numPeppers); } Stew(int numPotatoes, int numCarrots, int numMeat, int numPeppers); void mix(); void taste(); }
Stew { public void mix() { LOGGER.info("Mixing the stew we find: {} potatoes, {} carrots, {} meat and {} peppers", numPotatoes, numCarrots, numMeat, numPeppers); } Stew(int numPotatoes, int numCarrots, int numMeat, int numPeppers); void mix(); void taste();  }