package name.webdizz.fault.tolerance.inventory.client.command;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static name.webdizz.fault.tolerance.inventory.client.InventoryApiTestConstants.DEFAULT_PRODUCT;
import static name.webdizz.fault.tolerance.inventory.client.InventoryApiTestConstants.DEFAULT_STORE;
import static name.webdizz.fault.tolerance.inventory.client.InventoryApiTestConstants.INVENTORY_SERVICE_URL;

import org.junit.Test;
import name.webdizz.fault.tolerance.inventory.client.InventoryRequester;
import name.webdizz.fault.tolerance.inventory.domain.Inventory;

public class TimeOutInventoryRequestCommandTest {

    private static final int TIMEOUT_IN_MILLIS = 10;
    private InventoryRequester inventoryRequester = new InventoryRequester(INVENTORY_SERVICE_URL);

    @Test
    public void shouldNotCompleteInventoryRequestDueToTimeout() {
        TimeOutInventoryRequestCommand timeOutInventoryRequestCommand;
        timeOutInventoryRequestCommand = new TimeOutInventoryRequestCommand(inventoryRequester, DEFAULT_STORE, DEFAULT_PRODUCT, TIMEOUT_IN_MILLIS);
        Inventory inventory = timeOutInventoryRequestCommand.execute();
        assertThat(timeOutInventoryRequestCommand.isResponseTimedOut(), is(true));
    }
}
@@ -552,72 +552,8 @@
 ter;
-%0Aimport name.webdizz.fault.tolerance.inventory.domain.Inventory;
 %0A%0Apu
@@ -752,16 +752,59 @@
 CE_URL);
+%0A    private final boolean timedOut = true;
 %0A%0A    @T
@@ -1104,27 +1104,23 @@
     
-Inventory inventory
+boolean request
  = t
@@ -1153,15 +1153,26 @@
 and.
-exec
+isResponseTimedO
 ut
-e
 ();%0A
@@ -1194,68 +1194,28 @@
 hat(
-timeOutInventoryRequestCommand.isResponseTimedOut(), is(true
+request, is(timedOut
 ));%0A

Enhance readability of time out command test