@Test public void getAppsFilteredByCaseInsensitiveNames() { String frontPageName = "Frontpage"; String frontPageNameCI = "frontpage"; EurekaServiceInstance frontPageWithAdminAndUser = getServiceInstance(frontPageName, null); when(discoveryClientMock.getInstances(frontPageName)).thenReturn(singletonList(frontPageWithAdminAndUser)); when(discoveryClientMock.getServices()).thenReturn(singletonList(frontPageName)); AppQuery query = AppQuery.builder().withAppName(frontPageNameCI).build(); Map<String, List<CoffeeNetApp>> coffeeNetApps = coffeeNetAppService.getApps(query); assertThat(coffeeNetApps.entrySet(), hasSize(1)); assertThat(coffeeNetApps.get(frontPageNameCI).get(0).getName(), is(frontPageName)); }
@Override public Map<String, List<CoffeeNetApp>> getApps() { return getApps(AppQuery.builder().build()); }
IntegrationCoffeeNetAppService implements CoffeeNetAppService { @Override public Map<String, List<CoffeeNetApp>> getApps() { return getApps(AppQuery.builder().build()); } }
IntegrationCoffeeNetAppService implements CoffeeNetAppService { @Override public Map<String, List<CoffeeNetApp>> getApps() { return getApps(AppQuery.builder().build()); } IntegrationCoffeeNetAppService(DiscoveryClient discoveryClient); }
IntegrationCoffeeNetAppService implements CoffeeNetAppService { @Override public Map<String, List<CoffeeNetApp>> getApps() { return getApps(AppQuery.builder().build()); } IntegrationCoffeeNetAppService(DiscoveryClient discoveryClient); @Override Map<String, List<CoffeeNetApp>> getApps(); @Override Map<String, List<CoffeeNetApp>> getApps(AppQuery query); }
IntegrationCoffeeNetAppService implements CoffeeNetAppService { @Override public Map<String, List<CoffeeNetApp>> getApps() { return getApps(AppQuery.builder().build()); } IntegrationCoffeeNetAppService(DiscoveryClient discoveryClient); @Override Map<String, List<CoffeeNetApp>> getApps(); @Override Map<String, List<CoffeeNetApp>> getApps(AppQuery query);  }