  @Test
  public void shouldCheckCreditCardValidity() {


    CreditCard creditCard = new CreditCard("12341234", "10/10", 1234, "VISA");

    CardValidator cardValidator = new CardValidator();
    assertTrue("Credit card should be valid", cardValidator.validate(creditCard));
    creditCard.setNumber("2");
    assertTrue("Credit card should be valid", cardValidator.validate(creditCard));

    creditCard.setNumber("12341233");
    assertFalse("Credit card should not be valid", cardValidator.validate(creditCard));
    creditCard.setNumber("1");
    assertFalse("Credit card should not be valid", cardValidator.validate(creditCard));
  }