ApiAnnotationConfig { public void setIsDiscoverableIfSpecified(AnnotationBoolean discoverable) { if (discoverable == AnnotationBoolean.TRUE) { config.setIsDiscoverable(true); } else if (discoverable == AnnotationBoolean.FALSE) { config.setIsDiscoverable(false); } } ApiAnnotationConfig(ApiConfig config); ApiConfig getConfig(); void setRootIfNotEmpty(String root); void setNameIfNotEmpty(String name); void setCanonicalNameIfNotEmpty(String canonicalName); void setVersionIfNotEmpty(String version); void setTitleIfNotEmpty(String title); void setDescriptionIfNotEmpty(String description); void setDocumentationLinkIfNotEmpty(String documentationLink); void setBackendRootIfNotEmpty(String backendRoot); void setIsAbstractIfSpecified(AnnotationBoolean isAbstract); void setIsDefaultVersionIfSpecified(AnnotationBoolean defaultVersion); void setIsDiscoverableIfSpecified(AnnotationBoolean discoverable); void setUseDatastoreIfSpecified(AnnotationBoolean useDatastore); void setResourceIfNotEmpty(String resource); void setAuthLevelIfSpecified(AuthLevel authLevel); void setScopesIfSpecified(String[] scopes); void setAudiencesIfSpecified(String[] audiences); void setIssuersIfSpecified(ApiIssuerConfigs issuers); void setIssuerAudiencesIfSpecified(ApiIssuerAudienceConfig issuerAudiences); void setClientIdsIfSpecified(String[] clientIds); void setAuthenticatorsIfSpecified(Class<? extends Authenticator>[] authenticators); void setPeerAuthenticatorsIfSpecified(
      Class<? extends PeerAuthenticator>[] peerAuthenticators); void setApiKeyRequiredIfSpecified(AnnotationBoolean apiKeyRequired); void setApiLimitMetrics(ApiLimitMetric[] apiLimitMetrics);  }
@Test public void testSetIsDiscoverableIfSpecified() { annotationConfig.setIsDiscoverableIfSpecified(AnnotationBoolean.FALSE); assertEquals(false, config.getIsDiscoverable()); }
@Test public void testSetIsDiscoverableIfSpecified_unspecified() { annotationConfig.setIsDiscoverableIfSpecified(AnnotationBoolean.UNSPECIFIED); testDefaults(); annotationConfig.setIsDiscoverableIfSpecified(AnnotationBoolean.FALSE); annotationConfig.setIsDiscoverableIfSpecified(AnnotationBoolean.UNSPECIFIED); assertEquals(false, config.getIsDiscoverable()); }