@Test
@SuppressWarnings("unchecked")
public void executeCommandTestDealingWithIoException() throws IOException, InterruptedException {

    spy.logger = Mockito.mock(Logger.class);
    Runtime runtimeMock = configureAndGetRuntimeMock();
    Mockito.when(runtimeMock.exec(command)).thenThrow(IOException.class);
    String commandOutput = spy.executeCommand(command);
    executeChecksForExceptionTests(commandOutput, IOException.class);
}