CowExecutor { public void setMode(final String mode) { this.mode = mode; }  void setEyes(final String eyes); void setCowfile(final String cowfile); void setThink(final boolean think); void setTongue(final String tongue); void setWrap(final String wrap); void setMessage(final String message); void setMode(final String mode); void setLang(final String lang); void setHtml(final boolean html); void setAlt(final String alt); String execute();  }
@Test public void testSetMode() { CowExecutor instance = new CowExecutor(); instance.setMessage("Hello"); Set<String> modes = CowsayTest.modeMap.keySet(); for (String key : modes) { System.out.println("setMode " + key); String expResult = TestUtils.loadExpected(CowsayTest.modeMap.get(key)); instance.setMode(key); String result = instance.execute(); Assert.assertEquals(expResult, result); } }