@Test
public void testSetScopesIfSpecified_unspecified() throws Exception {

  String[] unspecified = {Api.UNSPECIFIED_STRING_FOR_LIST};
  EndpointMethod method = getResultNoParamsMethod();
  annotationConfig.setScopesIfSpecified(unspecified);
  ApiMethodConfig methodConfig = config.getApiClassConfig().getMethods().getOrCreate(method);
  assertEquals(toScopeExpression(Constant.API_EMAIL_SCOPE), methodConfig.getScopeExpression());
  String[] scopes = {"bleh", "more bleh"};
  annotationConfig.setScopesIfSpecified(scopes);
  annotationConfig.setScopesIfSpecified(null);
  assertEquals(toScopeExpression(scopes), config.getScopeExpression());
  annotationConfig.setScopesIfSpecified(scopes);
  annotationConfig.setScopesIfSpecified(unspecified);
  assertEquals(toScopeExpression(scopes), config.getScopeExpression());
}