CreditCardInstallment { public void setTermSelected(int termPosition) { this.termSelected = this.installmentTerms.size() == 0 ? 0 : this.installmentTerms.get(termPosition); }  void setInstallment(Installment installment); boolean isInstallmentAvailable(); ArrayList<Integer> getTerms(String bank); int getTermByPosition(int currentPosition); void setTermSelected(int termPosition); boolean isInstallmentValid(); boolean isInstallmentOptionRequired(); void setAvailableStatus(boolean availableStatus); int getTermSelected(); String getBankSelected(); Installment getInstallment();  }
@Test public void setTermSelected() { initSampleTerms(); when(installmentMock.getTerms()).thenReturn(sampleTerms); creditCardInstallment.setInstallment(installmentMock); creditCardInstallment.getTerms(BANK_BNI); creditCardInstallment.setTermSelected(1); assertEquals(creditCardInstallment.getTermSelected(), 6); }