CreditCardTransaction { public boolean isInWhiteList(String cardBin) { return isWhiteListBinsAvailable() && creditCard.getWhitelistBins().contains(cardBin); } CreditCardTransaction(); void setProperties(CreditCard creditCard, ArrayList<BankBinsResponse> bankBins); boolean isWhiteListBinsAvailable(); boolean isBlackListBinsAvailable(); void setBlackListBinsAvailable(boolean blackListBinsAvailable); boolean isInstallmentAvailable(); boolean isBankBinsAvailable(); void setBankBins(ArrayList<BankBinsResponse> bankBins); boolean isInWhiteList(String cardBin); ArrayList<Integer> getInstallmentTerms(String cardBin); String getBankByBin(String cardBin); String getBankByCardNumber(String cardNumber); boolean isMandiriCardDebit(String cardBin); Integer getInstallmentTerm(int currentPosition); void setInstallment(int termPosition); boolean isInstallmentValid(); void setInstallmentAvailableStatus(boolean installmentStatus); int getInstallmentTermSelected(); String getInstallmentBankSelected(); void setBankPointStatus(boolean bniPointActivated); void setBankPoint(BanksPointResponse response, String bankType); String getBankName(); boolean isBankPointEnabled(); boolean isBankPointValid(); float getBankPointRedeemed(); void setBankPointRedeemed(float pointRedeemed); boolean checkCardBinValidity(String cardNumber); boolean isBlacklistContainCardNumber(String cardNumber); boolean isCardBinBlocked(String cardNumber); void setSelectedPromo(Promo seletedPromo); Promo getSelectedPromo(); boolean isSelectedPromoAvailable(); boolean isInstallmentOptionRequired();  }
@Test public void isInWhitlistbins_whenValid() { assertTrue(cardTransaction.isInWhiteList(BIN_VALID)); }
@Test public void isInWhitlistbins_whenInvalid() { assertFalse(cardTransaction.isInWhiteList(BIN_INVALID)); }