SingleUserProvider implements UserProvider { @Override public FeatureUser getCurrentUser() { return user; } SingleUserProvider(String name);  SingleUserProvider(String name, boolean featureAdmin);  SingleUserProvider(FeatureUser featureUser); @Override FeatureUser getCurrentUser();  }
@Test void canProvideNamedUser() { String username = "named-user"; boolean featureAdmin = true; UserProvider userProvider = new SingleUserProvider(username, featureAdmin); FeatureUser user = userProvider.getCurrentUser(); assertEquals(username, user.getName()); assertEquals(featureAdmin, user.isFeatureAdmin()); }