CreditCardInstallment { public int getTermByPosition(int currentPosition) { return installmentTerms.get(currentPosition); }  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 getTermByPosition() { initSampleTerms(); when(installmentMock.getTerms()).thenReturn(sampleTerms); creditCardInstallment.setInstallment(installmentMock); creditCardInstallment.getTerms(BANK_BNI); assertEquals(12, creditCardInstallment.getTermByPosition(2)); }