@Test
@PrepareForTest(WakeOnLanInstallation.class)
public void installWakeOnLanTestIfNotInstalled() throws Exception {

    prepareMockedFileThatRepresentsTheWakeOnLanCommand(false);
    String command = "aptitude -y install wakeonlan";
    final String returnOfInstallationCommand = "return of command";
    Mockito.when(wakeOnLanInstallation.shellCommandUtils.executeCommand(command)).thenReturn(returnOfInstallationCommand);
    wakeOnLanInstallation.installWakeOnLan();
    InOrder inOrder = Mockito.inOrder(wakeOnLanInstallation.shellCommandUtils, wakeOnLanInstallation.logger);
    inOrder.verify(wakeOnLanInstallation.logger).info("Checking if wakeonlan is installed.");
    inOrder.verify(wakeOnLanInstallation.logger).info("Wakeonlan is not installed.");
    inOrder.verify(wakeOnLanInstallation.logger).info("Installing wakeonlan.");
    inOrder.verify(wakeOnLanInstallation.shellCommandUtils).executeCommand(command);
    inOrder.verify(wakeOnLanInstallation.logger).info(returnOfInstallationCommand);
    inOrder.verify(wakeOnLanInstallation.logger).info("Installation finished.");
    Mockito.verify(wakeOnLanInstallation.logger, Mockito.times(0)).info("Wakeonlan is already installed.");
}