FileLimitMaintainerTask implements MaintainerTask { @Override public void logParameters() { getFileLimit(); logger.info("Filelimit method is used to maintain log files with parameters: filelimit: " + fileLimit); }  @Override void run(); @Override void logParameters();  }
@Test public void testLogParameters() { given(properties.getFileLimit()).willReturn(4); Whitebox.setInternalState(underTest, "logger", logger); underTest.logParameters(); verify(logger).info("Filelimit method is used to maintain log files with parameters: filelimit: 4"); }