@Test
public void testExecutionTimeoutValue() {

    HystrixCommand.Setter properties = HystrixCommand.Setter
            .withGroupKey(HystrixCommandGroupKey.Factory.asKey("TestKey"))
            .andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
                    .withExecutionTimeoutInMilliseconds(50));
    HystrixCommand<String> command = new HystrixCommand<String>(properties) {
        @Override
        protected String run() throws Exception {
            Thread.sleep(3000);
            // should never reach here
            return "hello";
        }
        @Override
        protected String getFallback() {
            if (isResponseTimedOut()) {
                return "timed-out";
            } else {
                return "abc";
            }
        }
    };
    String value = command.execute();
    assertTrue(command.isResponseTimedOut());
    assertEquals("expected fallback value", "timed-out", value);
}