@Test public void isValidCardLengthWithBrand_whenBrandUnknown_alwaysReturnsFalse() { String validVisa = "4242424242424242"; assertTrue(CardUtils.isValidCardLength(validVisa)); assertFalse(CardUtils.isValidCardLength(validVisa, Card.UNKNOWN)); }
static boolean isValidCardLength(@Nullable String cardNumber) { return cardNumber != null && isValidCardLength(cardNumber, getPossibleCardType(cardNumber, false)); }
CardUtils { static boolean isValidCardLength(@Nullable String cardNumber) { return cardNumber != null && isValidCardLength(cardNumber, getPossibleCardType(cardNumber, false)); } }
CardUtils { static boolean isValidCardLength(@Nullable String cardNumber) { return cardNumber != null && isValidCardLength(cardNumber, getPossibleCardType(cardNumber, false)); }  }
CardUtils { static boolean isValidCardLength(@Nullable String cardNumber) { return cardNumber != null && isValidCardLength(cardNumber, getPossibleCardType(cardNumber, false)); }  @NonNull @Card.CardBrand static String getPossibleCardType(@Nullable String cardNumber); static boolean isValidCardNumber(@Nullable String cardNumber); }
CardUtils { static boolean isValidCardLength(@Nullable String cardNumber) { return cardNumber != null && isValidCardLength(cardNumber, getPossibleCardType(cardNumber, false)); }  @NonNull @Card.CardBrand static String getPossibleCardType(@Nullable String cardNumber); static boolean isValidCardNumber(@Nullable String cardNumber);  }