CompactSummaryRenderer extends Renderer<CompactSummary> { @VisibleForTesting boolean shouldShowCftDisclaimer(final SummaryModel props) { return PaymentTypes.isCreditCardPaymentType(props.getPaymentTypeId()) && !TextUtil.isEmpty(props.getCftPercent()); }  @Override View render(@NonNull final CompactSummary component, @NonNull final Context context,
        final ViewGroup parent);  }
@Test public void whenInstallmentsMoreThanOneAndPaymentTypeCreditCardShowCFT() { when(model.getPaymentTypeId()).thenReturn(PaymentTypes.CREDIT_CARD); when(model.getCftPercent()).thenReturn("123"); assertTrue(compactSummaryRenderer.shouldShowCftDisclaimer(model)); }
@Test public void whenInstallmentsMoreThanOneAndPaymentTypeDebitCardDoNotShowCFT() { when(model.getPaymentTypeId()).thenReturn(PaymentTypes.DEBIT_CARD); assertFalse(compactSummaryRenderer.shouldShowCftDisclaimer(model)); }
@Test public void whenInstallmentsMoreThanOneAndPaymentTypeCreditCardButNoCftDoNotShowCFT() { when(model.getPaymentTypeId()).thenReturn(PaymentTypes.CREDIT_CARD); when(model.getCftPercent()).thenReturn(""); assertFalse(compactSummaryRenderer.shouldShowCftDisclaimer(model)); }
@Test public void whenInstallmentsOneAndPaymentTypeCreditCardDoNotShowCFT() { when(model.getPaymentTypeId()).thenReturn(PaymentTypes.CREDIT_CARD); assertFalse(compactSummaryRenderer.shouldShowCftDisclaimer(model)); }