ApiMethodAnnotationConfig { public void setNameIfNotEmpty(String name) { if (name != null && !name.isEmpty()) { config.setName(name); } } ApiMethodAnnotationConfig(ApiMethodConfig config); ApiMethodConfig getConfig(); void setNameIfNotEmpty(String name); void setDescriptionIfNotEmpty(String description); void setPathIfNotEmpty(String path); void setHttpMethodIfNotEmpty(String httpMethod); 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 setIgnoredIfSpecified(AnnotationBoolean ignored); void setApiKeyRequiredIfSpecified(AnnotationBoolean apiKeyRequired); void setMetricCosts(ApiMetricCost[] metricCosts);  }
@Test public void testSetNameIfNotEmpty() { annotationConfig.setNameIfNotEmpty("bleh"); assertEquals("bleh", config.getName()); }
@Test public void testSetNameIfNotEmpty_empty() { annotationConfig.setNameIfNotEmpty(""); testDefaults(); annotationConfig.setNameIfNotEmpty("foo"); annotationConfig.setNameIfNotEmpty(""); assertEquals("foo", config.getName()); }