ApiCacheControlAnnotationConfig { public void setTypeIfNotEmpty(String type) { if (type != null && !type.isEmpty()) { config.setType(type); } } ApiCacheControlAnnotationConfig(ApiCacheControlConfig config); ApiCacheControlConfig getConfig(); void setTypeIfNotEmpty(String type); void setMaxAgeIfSpecified(int maxAge);  }
@Test public void testSetTypeIfNotEmpty() { annotationConfig.setTypeIfNotEmpty("bleh"); assertEquals("bleh", config.getType()); }
@Test public void testSetTypeIfNotEmpty_empty() { annotationConfig.setTypeIfNotEmpty(""); testDefaults(); annotationConfig.setTypeIfNotEmpty("foo"); annotationConfig.setTypeIfNotEmpty(""); assertEquals("foo", config.getType()); }