### Question:
Scope { public static boolean validScopeName(String scopeName) { Matcher m = SCOPE_PATTERN.matcher(scopeName); if (m.find()) { return true; } return false; }  String getScope(); void setScope(String scope); String getDescription(); void setDescription(String description); Integer getCcExpiresIn(); void setCcExpiresIn(Integer ccExpiresIn); Integer getPassExpiresIn(); void setPassExpiresIn(int passExpiresIn); Integer getRefreshExpiresIn(); void setRefreshExpiresIn(Integer refreshExpiresIn); static Scope loadFromMap(Map<String, Object> map); static Scope loadFromStringMap(Map<String, String> map); static Scope loadFromStringList(List<String> list); boolean valid(); boolean validForUpdate(); static boolean validScopeName(String scopeName); static final String SCOPE_FIELD; static final String DESCRIPTION_FIELD; static final String CC_EXPIRES_IN_FIELD; static final String PASS_EXPIRES_IN_FIELD; static final String REFRESH_EXPIRES_IN_FIELD; static final String JSON_CC_EXPIRES_IN; static final String JSON_PASS_EXPIRES_IN; static final String JSON_REFRESH_EXPIRES_IN; static final Pattern SCOPE_PATTERN; }### Answer:
@Test public void when_scope_name_contains_not_alphaNumeric_return_false() throws Exception { boolean valid = Scope.validScopeName("basic@es"); assertFalse(valid); }
@Test public void when_scope_name_contains_space_return_false() throws Exception { boolean valid = Scope.validScopeName("basic my"); assertFalse(valid); }
@Test public void when_scope_name_contains_dash_return_true() throws Exception { boolean valid = Scope.validScopeName("my-basic"); assertTrue(valid); }
@Test public void when_scope_name_contains_several_dashes_return_true() throws Exception { boolean valid = Scope.validScopeName("my-basic-scope"); assertTrue(valid); }
@Test public void when_scope_name_contains_dash_and_undescore_return_true() throws Exception { boolean valid = Scope.validScopeName("my-basic_scope"); assertTrue(valid); }
@Test public void when_scope_name_contains_several_undescores_return_true() throws Exception { boolean valid = Scope.validScopeName("my_basic_scope"); assertTrue(valid); }