@Test public void getApps() { Map<String, List<CoffeeNetApp>> coffeeNetApps = sut.getApps(); assertThat(coffeeNetApps.entrySet(), hasSize(3)); assertThat(coffeeNetApps.get("Coffee App").get(0).getName(), is("Coffee App")); assertThat(coffeeNetApps.get("Coffee App").get(0).getAuthorities(), is(emptyIterable())); assertThat(coffeeNetApps.get("Profile").get(0).getName(), is("Profile")); assertThat(coffeeNetApps.get("Profile").get(0).getAuthorities(), is(emptyIterable())); assertThat(coffeeNetApps.get("Coffee Admin App").get(0).getName(), is("Coffee Admin App")); assertThat(coffeeNetApps.get("Coffee Admin App").get(0).getAuthorities(), hasItem("ROLE_COFFEENET-ADMIN")); }
@Override public Map<String, List<CoffeeNetApp>> getApps() { Map<String, List<CoffeeNetApp>> apps = new TreeMap<>(CASE_INSENSITIVE_ORDER); apps.put("Coffee App", singletonList(new CoffeeNetApp("Coffee App", "https: apps.put("Profile", singletonList(new CoffeeNetApp("Profile", "https: apps.put("Coffee Admin App", singletonList( new CoffeeNetApp("Coffee Admin App", "https: new HashSet<>(singletonList("ROLE_COFFEENET-ADMIN"))))); return apps; }
DevelopmentCoffeeNetAppService implements CoffeeNetAppService { @Override public Map<String, List<CoffeeNetApp>> getApps() { Map<String, List<CoffeeNetApp>> apps = new TreeMap<>(CASE_INSENSITIVE_ORDER); apps.put("Coffee App", singletonList(new CoffeeNetApp("Coffee App", "https: apps.put("Profile", singletonList(new CoffeeNetApp("Profile", "https: apps.put("Coffee Admin App", singletonList( new CoffeeNetApp("Coffee Admin App", "https: new HashSet<>(singletonList("ROLE_COFFEENET-ADMIN"))))); return apps; } }
DevelopmentCoffeeNetAppService implements CoffeeNetAppService { @Override public Map<String, List<CoffeeNetApp>> getApps() { Map<String, List<CoffeeNetApp>> apps = new TreeMap<>(CASE_INSENSITIVE_ORDER); apps.put("Coffee App", singletonList(new CoffeeNetApp("Coffee App", "https: apps.put("Profile", singletonList(new CoffeeNetApp("Profile", "https: apps.put("Coffee Admin App", singletonList( new CoffeeNetApp("Coffee Admin App", "https: new HashSet<>(singletonList("ROLE_COFFEENET-ADMIN"))))); return apps; }  }
DevelopmentCoffeeNetAppService implements CoffeeNetAppService { @Override public Map<String, List<CoffeeNetApp>> getApps() { Map<String, List<CoffeeNetApp>> apps = new TreeMap<>(CASE_INSENSITIVE_ORDER); apps.put("Coffee App", singletonList(new CoffeeNetApp("Coffee App", "https: apps.put("Profile", singletonList(new CoffeeNetApp("Profile", "https: apps.put("Coffee Admin App", singletonList( new CoffeeNetApp("Coffee Admin App", "https: new HashSet<>(singletonList("ROLE_COFFEENET-ADMIN"))))); return apps; }  @Override Map<String, List<CoffeeNetApp>> getApps(); @Override Map<String, List<CoffeeNetApp>> getApps(AppQuery query); }
DevelopmentCoffeeNetAppService implements CoffeeNetAppService { @Override public Map<String, List<CoffeeNetApp>> getApps() { Map<String, List<CoffeeNetApp>> apps = new TreeMap<>(CASE_INSENSITIVE_ORDER); apps.put("Coffee App", singletonList(new CoffeeNetApp("Coffee App", "https: apps.put("Profile", singletonList(new CoffeeNetApp("Profile", "https: apps.put("Coffee Admin App", singletonList( new CoffeeNetApp("Coffee Admin App", "https: new HashSet<>(singletonList("ROLE_COFFEENET-ADMIN"))))); return apps; }  @Override Map<String, List<CoffeeNetApp>> getApps(); @Override Map<String, List<CoffeeNetApp>> getApps(AppQuery query);  }