@@ -0,0 +1,2126 @@
+/*%0A * Copyright 2015-2016 the original author or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.springframework.security.oauth2.config.annotation;%0A%0Aimport static org.junit.Assert.assertNotNull;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;%0Aimport org.springframework.security.oauth2.config.annotation.TokenServicesMultipleBeansTests.BrokenOAuthApplication;%0Aimport org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;%0Aimport org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;%0Aimport org.springframework.security.oauth2.provider.token.ResourceServerTokenServices;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0Aimport org.springframework.test.context.web.WebAppConfiguration;%0A%0A/**%0A * @author Dave Syer%0A *%0A */%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@ContextConfiguration(classes=BrokenOAuthApplication.class)%0A@WebAppConfiguration%0Apublic class TokenServicesMultipleBeansTests %7B%0A%09%0A%09@Autowired%0A%09private ResourceServerTokenServices tokenServices;%0A%0A%09@Test%0A%09public void test() %7B%0A%09%09assertNotNull(tokenServices);%0A%09%7D%0A%0A%09@Configuration%0A%09@EnableAuthorizationServer%0A%09@EnableWebSecurity%0A%09protected static class BrokenOAuthApplication extends AuthorizationServerConfigurerAdapter %7B%0A%09%7D%0A%7D%0A

Add test for ambiguous token services