@Test
public void testInvokeRequestCachingParameters() throws Exception {

   MethodConfig methodConfig = MethodConfig.createBuilder(SERVICE_NAME, BEAN_NAME + ":" + FIELD_NAME)
                                           .hystrixActive(true)
                                           .cacheKeyParameterIndex(1)
                                           .commandProperty(CommandProperties.REQUEST_CACHE_ENABLED, Boolean.TRUE.toString())
                                           .build();
   ServiceConfig serviceConfig = new ServiceConfig(methodConfig);
   HystrixMethodHandler hystrixMethodHandler = new HystrixMethodHandler(parentMethodHandler, serviceConfig);
   Method method = UnstableMicroservice.class.getMethod("add", int.class, int.class);
   Mockito.when(parentMethodHandler.invoke(Mockito.any(), Mockito.any(), Mockito.any()))
          .thenAnswer(answer -> method.invoke(UnstableMicroservice.class, (Integer) answer.getArgument(1), (Integer) answer.getArgument(2)));
   hystrixMethodHandler.invoke(method, 1, 1);
   hystrixMethodHandler.invoke(method, 1, 2);
   hystrixMethodHandler.invoke(method, 2, 1);
   Mockito.verify(parentMethodHandler, Mockito.times(1)).invoke(method, 1, 1);
   Mockito.verify(parentMethodHandler, Mockito.times(1)).invoke(method, 1, 2);
   Mockito.verify(parentMethodHandler, Mockito.times(0)).invoke(method, 2, 1);
}