@Test
public void testNoDuplicatedScopes() throws IllegalAccessException {

    final String additionalScopeDuplicate = "abc";
    final StandardOidcIdentityProvider provider = createOidcProviderWithAdditionalScopes(additionalScopeDuplicate,
            "def", additionalScopeDuplicate);
    Scope scope = provider.getScope();
    // three additional scopes are set but one is duplicated and mustn't be returned; note that there is
    // another one inserted in between the duplicated; two (openid, email) are hard-coded
    assertEquals(scope.toArray().length, 4);
}