TimeLimitMaintainerTask implements MaintainerTask { @Override public void logParameters() { getTimeLimit(); logger.info("Timelimit method is used to maintain log files with parameters: timelimit: " + timeLimit); } TimeLimitMaintainerTask(); @Override void run(); @Override void logParameters();  }
@Test public void testLogParameters() { given(properties.getTimeLimit()).willReturn("36H"); underTest.logParameters(); verify(logger).info("Timelimit method is used to maintain log files with parameters: timelimit: 36H"); }