@Test public void getAppsNotOfTypeEurekaServiceInstance() { String frontPageName = "frontpage"; ServiceInstance serviceInstance = mock(ServiceInstance.class); when(discoveryClientMock.getInstances(frontPageName)).thenReturn(singletonList(serviceInstance)); when(discoveryClientMock.getServices()).thenReturn(singletonList(frontPageName)); AppQuery query = AppQuery.builder().withAppName(frontPageName).build(); Map<String, List<CoffeeNetApp>> coffeeNetApps = coffeeNetAppService.getApps(query); assertThat(coffeeNetApps.entrySet(), hasSize(0)); }
@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);  }