@Test
public void executeCommandTest() throws IOException, InterruptedException{

    Process processMock = Mockito.mock(Process.class);
    Runtime runtimeMock = configureAndGetRuntimeMock();
    String commandOutput = "TEST";
    InputStream input = IOUtils.toInputStream(commandOutput, (String) null);
    Mockito.when(runtimeMock.exec(command)).thenReturn(processMock);
    Mockito.when(processMock.waitFor()).thenReturn(1);
    Mockito.when(processMock.getInputStream()).thenReturn(input);
    String response = spy.executeCommand(command);
    Assert.assertEquals(commandOutput, response);
    Mockito.verify(processMock).waitFor();
}