BiCardSource implements CardSource { @Override public Card draw() { if( !aSource1.isEmpty() ) { return aSource2.draw(); } else { return aSource1.draw(); } } BiCardSource(CardSource pSource1, CardSource pSource2); @Override Card draw(); @Override boolean isEmpty();  }
@Test public void testDraw_FirstEmpty() { assertSame(ACE, new BiCardSource(aEmpty, aContainsAce).draw()); }
@Test public void testDraw_SecondEmpty() { assertSame(ACE, new BiCardSource(aContainsAce, aEmpty).draw()); }
@Test public void testDraw_NeitherEmpty() { assertSame(ACE, new BiCardSource(aContainsAce, aContainsTwo).draw()); }