AbstractLauncher implements Runnable { public void setDebug(final boolean debug) { this.debug = debug; } AbstractLauncher(); boolean isDebugging(); void setDebug(final boolean debug); boolean isRunning(); abstract String getLogFileName(); String getMember(); String getMemberId(); String getMemberName(); abstract Integer getPid(); abstract String getServiceName(); String getWorkingDirectory(); String version(); static final String MEMBER_NAME_ERROR_MESSAGE; static final String WORKING_DIRECTORY_OPTION_NOT_VALID_ERROR_MESSAGE; static final String WORKING_DIRECTORY_NOT_FOUND_ERROR_MESSAGE; static final String DEFAULT_WORKING_DIRECTORY; static final String SIGNAL_HANDLER_REGISTRATION_SYSTEM_PROPERTY; }
@Test public void canBeMocked() throws Exception { AbstractLauncher mockAbstractLauncher = mock(AbstractLauncher.class); mockAbstractLauncher.setDebug(true); verify(mockAbstractLauncher, times(1)).setDebug(true); }