diff --git a/openid-connect-server/src/test/java/org/mitre/oauth2/service/impl/TestDefaultSystemScopeService.java b/openid-connect-server/src/test/java/org/mitre/oauth2/service/impl/TestDefaultSystemScopeService.java index 96f74074f..8aba1073f 100644 --- a/openid-connect-server/src/test/java/org/mitre/oauth2/service/impl/TestDefaultSystemScopeService.java +++ b/openid-connect-server/src/test/java/org/mitre/oauth2/service/impl/TestDefaultSystemScopeService.java @@ -184,6 +184,60 @@ public class TestDefaultSystemScopeService { // extra scope (fail) assertThat(service.scopesMatch(expected, actualBad), is(false)); + + } + + @Test + public void getremoveRestrictedAndReservedScopes() { + + Set restrictedAndReservedScopes = Sets.newHashSet(defaultDynScope1, defaultDynScope2, dynScope1); + assertThat(service.removeRestrictedAndReservedScopes(allScopes),equalTo(restrictedAndReservedScopes)); + } + + @Test + public void getremoveReservedScopes() { + Set removeReservedScopes = Sets.newHashSet(defaultDynScope2, defaultDynScope1, defaultScope2,restrictedScope1,defaultScope1,dynScope1); + assertThat(service.removeReservedScopes(allScopes), equalTo(removeReservedScopes)); + } + + @Test + public void getById() { + + // check null condition + + assertThat(service.getById((long) 60), is(nullValue())); + + + } + + @Test + public void getByValue() { + + // check null condition + + assertThat(service.getByValue("defaultDynScope1String"), is(nullValue())); + + + } + + @Test + public void save() { + + // check null condition + + assertThat(service.save(defaultScope1), is(nullValue())); + + + + } + + @Test + public void getReserved() { + //Set restricted = Sets.newHashSet(defaultScope1, defaultScope2, restrictedScope1); + Set reserved = service.getReserved(); + assertThat(service.getReserved(), equalTo(reserved)); + } + }