@Test
public void testScopeMatcherIsolatedFromPrefixHanderFactory()
	throws Exception {

	PrefixHandlerFactory testPrefixHandlerFactory =
		propertyAccessor -> target -> "test/" + target;
	final ScopeMatcherFactory scopeMatcherFactory = Mockito.spy(
		new StrictScopeMatcherFactory());
	Builder builder = new Builder();
	ScopeLocatorImpl scopeLocatorImpl = builder.withPrefixHandlerFactories(
		propertyAccessor -> PrefixHandler.PASS_THROUGH_PREFIX_HANDLER,
		registrator -> registrator.register(
			_COMPANY_ID, _APPLICATION_NAME, testPrefixHandlerFactory)
	).withScopeMatcherFactories(
		scopeAlias -> scopeAlias::equals,
		registrator -> registrator.register(
			String.valueOf(_COMPANY_ID), scopeMatcherFactory)
	).withScopeFinders(
		registrator -> registrator.register(
			_COMPANY_ID, _APPLICATION_NAME, () -> scopesSet1)
	).build();
	Collection<LiferayOAuth2Scope> matchedLiferayOAuth2Scopes =
		scopeLocatorImpl.getLiferayOAuth2Scopes(
			_COMPANY_ID, "test/everything", _APPLICATION_NAME);
	Mockito.verify(
		scopeMatcherFactory, Mockito.atLeast(1)
	).create(
		"everything"
	);
	Set<String> matchedScopes = _getScopes(matchedLiferayOAuth2Scopes);
	Assert.assertTrue(matchedScopes.contains("everything"));
}