FoundationPile { public Card peek() { if( isEmpty() ) { throw new EmptyStackException(); } return aPile.get(aPile.size() - 1); }  boolean isEmpty(); Card peek(); Card pop(); void push(Card pCard); boolean canMoveTo(Card pCard);  }
@Test(expected = EmptyStackException.class) public void testPeek_Empty_Version1() { aPile.peek(); }