@Test
public void testClientDetailsFromNonPropertyFile() {
// valid client details NOT from property file
ClientDetails clientDetails = clientDetailsService.loadClientByClientId("my-client-id-non-property-file");
assertNotNull(clientDetailsService);
assertEquals("my-client-id-non-property-file", clientDetails.getClientId());
assertEquals("my-client-secret-non-property-file", clientDetails.getClientSecret());
Set<String> grantTypes = clientDetails.getAuthorizedGrantTypes();
assertNotNull(grantTypes);
assertEquals(2, grantTypes.size());
assertTrue(grantTypes.contains("password"));
assertTrue(grantTypes.contains("authorization_code"));
Set<String> scopes = clientDetails.getScope();
assertNotNull(scopes);
assertEquals(2, scopes.size());
assertTrue(scopes.contains("scope1"));
assertTrue(scopes.contains("scope2"));
Collection<GrantedAuthority> authorities = clientDetails.getAuthorities();
assertNotNull(authorities);
assertEquals(2, authorities.size());
assertTrue(AuthorityUtils.authorityListToSet(authorities).contains("ROLE_USER"));
assertTrue(AuthorityUtils.authorityListToSet(authorities).contains("ROLE_ANONYMOUS"));
}