public class HandTest { public static void main(String[] args) { Hand hand = new Hand(); // test initial conditions assert hand.getScore() == 0; assert hand.getSize() == 0; assert hand.isSoft() == false; assert hand.isBust() == false; // play a 4, 3, 2 hand.updateScore(Card.FOUR); assert hand.getScore() == 4; assert hand.getSize() == 1; assert hand.isSoft() == false; assert hand.isBust() == false; hand.updateScore(Card.THREE); assert hand.getScore() == 7; assert hand.getSize() == 2; assert hand.isSoft() == false; assert hand.isBust() == false; hand.updateScore(Card.DEUCE); assert hand.getScore() == 9; assert hand.getSize() == 3; assert hand.isSoft() == false; assert hand.isBust() == false; // now play an ace, should result in a soft 20 hand.updateScore(Card.ACE); assert hand.getScore() == 20; assert hand.getSize() == 4; assert hand.isSoft() == true; assert hand.isBust() == false; // now play a JACK, it should result in a hard 20 hand.updateScore(Card.JACK); assert hand.getScore() == 20; assert hand.getSize() == 5; assert hand.isSoft() == false; assert hand.isBust() == false; // now play a 2, it should result in being bust hand.updateScore(Card.DEUCE); assert hand.getScore() == 22; assert hand.getSize() == 6; assert hand.isSoft() == false; assert hand.isBust() == true; // now create a new hand and initialize it hand = new Hand(); hand.initialize(); assert hand.getSize() == 2; assert hand.isBust() == false; } }