I have the following simple method
within my Java
Application:
Method I wish to test:
public void showOutputOfIdentifications(int age) {
if(age>25){
LOGGER.info("Over 25");
}else{
LOGGER.info("25 or Under");
}
}
How can I test this method to ensure it is logging what it should if a value is over/under 25?
For reference: I am currently using the Junit
framework with Mockito
. My logger is slf4j
.