package us.deans.pigs.client; import static org.junit.Assert.assertEquals; import org.junit.Test; import us.deans.pigs.api.Wolf; import us.deans.pigs.api.AnimalFactory; public class WolfTest { @Test public void threatenTest() { try { AnimalFactory aFactory = new AnimalFactory(); Wolf wolf = (Wolf) aFactory.getMe("a wolf"); assertEquals("I'll Huff and I'll Puff and I'll BLOW your house down!", wolf.threaten()); } catch(Exception ex){ System.out.println("Here..." + ex.getMessage()); System.out.println("And this too..." + ex.getStackTrace()); } } // end method } // end class