ClassPathResourceManage implements Manage { @Override public List<EntityMetaData> serviceProviders() { return entityMetaData.get(SP_ENTITY_ID); } ClassPathResourceManage(); @Override List<EntityMetaData> serviceProviders(); @Override List<EntityMetaData> identityProviders(); @Override Set<EntityMetaData> identityProvidersByAuthenticatingAuthority(String authenticatingAuthority); @Override Set<EntityMetaData> serviceProvidersByInstitutionId(String institutionId); @Override Optional<EntityMetaData> serviceProviderOptionalByEntityId(String entityId); @Override Optional<EntityMetaData> identityProviderOptionalByEntityId(String entityId); @Override Map<String, EntityMetaData> identityProvidersByEntityIds(Collection<String> entityIds); @Override Map<String, EntityMetaData> serviceProvidersByEntityIds(Collection<String> entityIds); @Override EntityMetaData serviceProviderByEntityId(String entityId); @Override EntityMetaData identityProviderByEntityId(String entityId); void allowAll(boolean allowAll);  }
@Test public void testServiceProviders() throws Exception { List<EntityMetaData> sps = manage.serviceProviders(); assertEquals(51, sps.size()); assertTrue(sps.stream().allMatch(entityMetaData -> StringUtils.hasText(entityMetaData.getEntityId()))); assertEquals(asList("B", "B", "D"), sps.subList(0, 3).stream().map(e -> e.getNameEn().substring(0, 1)).collect(toList())); }