ApiClassAnnotationConfig { public void setClientIdsIfSpecified(String[] clientIds) { if (!AnnotationUtil.isUnspecified(clientIds)) { config.setClientIds(Arrays.asList(clientIds)); } } ApiClassAnnotationConfig(ApiClassConfig config); void setResourceIfNotEmpty(String resource); void setAuthLevelIfSpecified(AuthLevel authLevel); void setScopesIfSpecified(String[] scopes); void setAudiencesIfSpecified(String[] audiences); void setIssuerAudiencesIfSpecified(ApiIssuerAudienceConfig issuerAudiences); void setClientIdsIfSpecified(String[] clientIds); void setAuthenticatorsIfSpecified(Class<? extends Authenticator>[] authenticators); void setPeerAuthenticatorsIfSpecified(
      Class<? extends PeerAuthenticator>[] peerAuthenticators); void setUseDatastoreIfSpecified(AnnotationBoolean useDatastore); void setApiKeyRequiredIfSpecified(AnnotationBoolean apiKeyRequired);  }
@Test public void testSetClientIdsIfSpecified() throws Exception { String[] clientIds = {"foo", "bar"}; annotationConfig.setClientIdsIfSpecified(clientIds); Mockito.verify(config).setClientIds(Arrays.asList(clientIds)); }
@Test public void testSetClientIdsIfSpecified_empty() throws Exception { String[] empty = {}; annotationConfig.setClientIdsIfSpecified(empty); Mockito.verify(config).setClientIds(Arrays.asList(empty)); }
@Test public void testSetClientIdsIfSpecified_unspecified() throws Exception { annotationConfig.setClientIdsIfSpecified(null); Mockito.verifyZeroInteractions(config); String[] unspecified = {Api.UNSPECIFIED_STRING_FOR_LIST}; annotationConfig.setClientIdsIfSpecified(unspecified); Mockito.verifyZeroInteractions(config); String[] clientIds = {"bleh", "more bleh"}; annotationConfig.setClientIdsIfSpecified(clientIds); annotationConfig.setClientIdsIfSpecified(unspecified); Mockito.verify(config).setClientIds(Arrays.asList(clientIds)); Mockito.verifyNoMoreInteractions(config); }