@Test public void testFindPropertyNotFound() { when(envVariable.value()).thenReturn("value"); assertThat(producer.findProperty(ip)).isEqualTo(""); }
@Produces @EnvVariable("") String findProperty(InjectionPoint ip) { EnvVariable annotation = ip.getAnnotated() .getAnnotation(EnvVariable.class); String name = annotation.value(); String found = getEnv(name); if (found == null) { log.warn( "Environment variable '{}' is not defined!", name); } return Strings.nullToEmpty(found); }
EnvVariableProducer { @Produces @EnvVariable("") String findProperty(InjectionPoint ip) { EnvVariable annotation = ip.getAnnotated() .getAnnotation(EnvVariable.class); String name = annotation.value(); String found = getEnv(name); if (found == null) { log.warn( "Environment variable '{}' is not defined!", name); } return Strings.nullToEmpty(found); } }
EnvVariableProducer { @Produces @EnvVariable("") String findProperty(InjectionPoint ip) { EnvVariable annotation = ip.getAnnotated() .getAnnotation(EnvVariable.class); String name = annotation.value(); String found = getEnv(name); if (found == null) { log.warn( "Environment variable '{}' is not defined!", name); } return Strings.nullToEmpty(found); }  }
EnvVariableProducer { @Produces @EnvVariable("") String findProperty(InjectionPoint ip) { EnvVariable annotation = ip.getAnnotated() .getAnnotation(EnvVariable.class); String name = annotation.value(); String found = getEnv(name); if (found == null) { log.warn( "Environment variable '{}' is not defined!", name); } return Strings.nullToEmpty(found); }   }
EnvVariableProducer { @Produces @EnvVariable("") String findProperty(InjectionPoint ip) { EnvVariable annotation = ip.getAnnotated() .getAnnotation(EnvVariable.class); String name = annotation.value(); String found = getEnv(name); if (found == null) { log.warn( "Environment variable '{}' is not defined!", name); } return Strings.nullToEmpty(found); }    }