WorldpayBankController { @ResponseBody @RequestMapping(value = "/{apm}/banks", method = GET) public List<BankConfigurationData> getBanksForAPM(@PathVariable String apm) { return worldpayBankConfigurationFacade.getBankConfigurationForAPMCode(apm); }  @ResponseBody @RequestMapping(value = "/{apm}/banks", method = GET) List<BankConfigurationData> getBanksForAPM(@PathVariable String apm);  }
@Test public void testGetMerchantsBySite() throws Exception { final List<BankConfigurationData> bankConfigurations = Collections.singletonList(bankConfigurationData); when(worldpayBankConfigurationFacadeMock.getBankConfigurationForAPMCode(APM_CODE)).thenReturn(bankConfigurations); List<BankConfigurationData> result = testObj.getBanksForAPM(APM_CODE); assertEquals(bankConfigurations, result); }