@Test void testPolicies() { assertEquals(0, Policies.of(null).length); Policy<IdentityProvider>[] policies = Policies.of("pepe", Arrays.asList("master", "of", "the", "universe")); assertEquals(1, policies.length); assertEquals("pepe", policies[0].value().getName()); assertEquals(4, policies[0].value().getRoles().size()); }
private Policies() {}
Policies { private Policies() {} }
Policies { private Policies() {} private  Policies(); }
Policies { private Policies() {} private  Policies(); @SuppressWarnings("unchecked") static Policy<T>[] of(String user, Collection<String> roles); static Policy<T>[] of(String user); }
Policies { private Policies() {} private  Policies(); @SuppressWarnings("unchecked") static Policy<T>[] of(String user, Collection<String> roles); static Policy<T>[] of(String user);  }