WebsterMojo extends AbstractMojo { void suppressOakLogging(final @NotNull BiConsumer<String, String> propSetter) { if (!revealOakLogging) { final String SIMPLE_LOGGER_PREFIX = "org.slf4j.simpleLogger.log."; propSetter.accept(SIMPLE_LOGGER_PREFIX + "org.apache.jackrabbit.oak", "ERROR"); } }  @Override final void execute(); static final String PARAM_REPOSITORY_HOME; static final String PARAM_OAK_RUN_ARGS; static final String PARAM_TMPDIR; }
@Test public void testSuppressOakLogging() { WebsterMojo mojo = newMojo(); mojo.revealOakLogging = true; Properties props = new Properties(); mojo.suppressOakLogging(props::setProperty); assertTrue("props is still empty: " + props, props.isEmpty()); mojo.revealOakLogging = false; mojo.suppressOakLogging(props::setProperty); assertEquals("props is not empty: " + props, "ERROR", props.getProperty("org.slf4j.simpleLogger.log.org.apache.jackrabbit.oak")); }