@Test public void testEnter() throws Exception { final Wizard[] wizards = new Wizard[]{ new Wizard("Gandalf"), new Wizard("Dumbledore"), new Wizard("Oz"), new Wizard("Merlin") }; IvoryTower tower = new IvoryTower(); for (Wizard wizard : wizards) { tower.enter(wizard); } assertTrue(appender.logContains("Gandalf enters the tower.")); assertTrue(appender.logContains("Dumbledore enters the tower.")); assertTrue(appender.logContains("Oz enters the tower.")); assertTrue(appender.logContains("Merlin enters the tower.")); assertEquals(4, appender.getLogSize()); }
public void enter(Wizard wizard) { LOGGER.info("{} enters the tower.", wizard); }
IvoryTower implements WizardTower { public void enter(Wizard wizard) { LOGGER.info("{} enters the tower.", wizard); } }
IvoryTower implements WizardTower { public void enter(Wizard wizard) { LOGGER.info("{} enters the tower.", wizard); }  }
IvoryTower implements WizardTower { public void enter(Wizard wizard) { LOGGER.info("{} enters the tower.", wizard); }  void enter(Wizard wizard); }
IvoryTower implements WizardTower { public void enter(Wizard wizard) { LOGGER.info("{} enters the tower.", wizard); }  void enter(Wizard wizard);  }