@Test public void invokeWithEmptyUserRoles() { CurrentCoffeeNetUser currentCoffeeNetUser = new CurrentCoffeeNetUser("username", "email"); CoffeeNetApp coffeeNetApp = new CoffeeNetApp("NoRights", "urlNoRights", emptySet()); List<CoffeeNetApp> coffeeNetApps = singletonList(coffeeNetApp); CoffeeNetNavigationAppInformation coffeeNetNavigationAppInformation = new CoffeeNetNavigationAppInformation("", "", "", "", "", ""); CoffeeNetNavigationInformation coffeeNetNavigationInformation = new CoffeeNetNavigationInformation( currentCoffeeNetUser, coffeeNetApps, coffeeNetApp, "path", coffeeNetNavigationAppInformation); when(coffeeNetNavigationServiceMock.get()).thenReturn(coffeeNetNavigationInformation); CoffeeNetNavigationEndpoint sut = new CoffeeNetNavigationEndpoint(coffeeNetNavigationServiceMock); CoffeeNetNavigationInformation receivedCoffeeNetNavigationInformation = sut.invoke(); assertThat(receivedCoffeeNetNavigationInformation.getCoffeeNetApps(), is(coffeeNetApps)); assertThat(receivedCoffeeNetNavigationInformation.getCurrentCoffeeNetUser(), Is.is(currentCoffeeNetUser)); assertThat(receivedCoffeeNetNavigationInformation.getLogoutPath(), is("path")); assertThat(receivedCoffeeNetNavigationInformation.getProfileApp(), is(coffeeNetApp)); }
@Override public CoffeeNetNavigationInformation invoke() { return coffeeNetNavigationService.get(); }
CoffeeNetNavigationEndpoint implements Endpoint<CoffeeNetNavigationInformation> { @Override public CoffeeNetNavigationInformation invoke() { return coffeeNetNavigationService.get(); } }
CoffeeNetNavigationEndpoint implements Endpoint<CoffeeNetNavigationInformation> { @Override public CoffeeNetNavigationInformation invoke() { return coffeeNetNavigationService.get(); } CoffeeNetNavigationEndpoint(CoffeeNetNavigationService coffeeNetNavigationService); }
CoffeeNetNavigationEndpoint implements Endpoint<CoffeeNetNavigationInformation> { @Override public CoffeeNetNavigationInformation invoke() { return coffeeNetNavigationService.get(); } CoffeeNetNavigationEndpoint(CoffeeNetNavigationService coffeeNetNavigationService); @Override String getId(); @Override boolean isEnabled(); @Override boolean isSensitive(); @Override CoffeeNetNavigationInformation invoke(); }
CoffeeNetNavigationEndpoint implements Endpoint<CoffeeNetNavigationInformation> { @Override public CoffeeNetNavigationInformation invoke() { return coffeeNetNavigationService.get(); } CoffeeNetNavigationEndpoint(CoffeeNetNavigationService coffeeNetNavigationService); @Override String getId(); @Override boolean isEnabled(); @Override boolean isSensitive(); @Override CoffeeNetNavigationInformation invoke();  }