@Test public void shouldReturnNullIfBankCodeNull() { final WorldpayBankConfigurationModel result = testObj.getBankConfigurationForBankCode(null); assertNull(result); }
@Override public WorldpayBankConfigurationModel getBankConfigurationForBankCode(final String bankCode) { if (isBlank(bankCode)) { return null; } final List<WorldpayBankConfigurationModel> bankList = worldpayBankConfigurationGenericDao.find(ImmutableMap.of(WorldpayBankConfigurationModel.CODE, bankCode)); return bankList.get(0); }
DefaultWorldpayBankConfigurationLookupService implements WorldpayBankConfigurationLookupService { @Override public WorldpayBankConfigurationModel getBankConfigurationForBankCode(final String bankCode) { if (isBlank(bankCode)) { return null; } final List<WorldpayBankConfigurationModel> bankList = worldpayBankConfigurationGenericDao.find(ImmutableMap.of(WorldpayBankConfigurationModel.CODE, bankCode)); return bankList.get(0); } }
DefaultWorldpayBankConfigurationLookupService implements WorldpayBankConfigurationLookupService { @Override public WorldpayBankConfigurationModel getBankConfigurationForBankCode(final String bankCode) { if (isBlank(bankCode)) { return null; } final List<WorldpayBankConfigurationModel> bankList = worldpayBankConfigurationGenericDao.find(ImmutableMap.of(WorldpayBankConfigurationModel.CODE, bankCode)); return bankList.get(0); }  }
DefaultWorldpayBankConfigurationLookupService implements WorldpayBankConfigurationLookupService { @Override public WorldpayBankConfigurationModel getBankConfigurationForBankCode(final String bankCode) { if (isBlank(bankCode)) { return null; } final List<WorldpayBankConfigurationModel> bankList = worldpayBankConfigurationGenericDao.find(ImmutableMap.of(WorldpayBankConfigurationModel.CODE, bankCode)); return bankList.get(0); }  @Override List<WorldpayBankConfigurationModel> getActiveBankConfigurationsForCode(final String apmCode); @Override WorldpayBankConfigurationModel getBankConfigurationForBankCode(final String bankCode); @Required void setApmConfigurationLookupService(final APMConfigurationLookupService apmConfigurationLookupService); @Required void setWorldpayBankConfigurationGenericDao(final GenericDao<WorldpayBankConfigurationModel> worldpayBankConfigurationGenericDao); }
DefaultWorldpayBankConfigurationLookupService implements WorldpayBankConfigurationLookupService { @Override public WorldpayBankConfigurationModel getBankConfigurationForBankCode(final String bankCode) { if (isBlank(bankCode)) { return null; } final List<WorldpayBankConfigurationModel> bankList = worldpayBankConfigurationGenericDao.find(ImmutableMap.of(WorldpayBankConfigurationModel.CODE, bankCode)); return bankList.get(0); }  @Override List<WorldpayBankConfigurationModel> getActiveBankConfigurationsForCode(final String apmCode); @Override WorldpayBankConfigurationModel getBankConfigurationForBankCode(final String bankCode); @Required void setApmConfigurationLookupService(final APMConfigurationLookupService apmConfigurationLookupService); @Required void setWorldpayBankConfigurationGenericDao(final GenericDao<WorldpayBankConfigurationModel> worldpayBankConfigurationGenericDao);  }