@Test
public void testCreateCacheResultInvocationContext_givenMethodAnnotatedWithCacheResult_shouldCreateCorrectCacheKeyInvocationContext()
        throws NoSuchMethodException {

    // given
    TestCacheClass testCacheClass = new TestCacheClass();
    String param1 = "val_1";
    String param2 = "val_2";
    Integer param3 = 3;
    MetaHolder metaHolder = MetaHolder.builder()
            .method(TestCacheClass.class.getMethod("cacheResultMethod", String.class, String.class, Integer.class))
            .args(new Object[]{param1, param2, param3})
            .obj(testCacheClass).build();
    // when
    CacheInvocationContext<CacheResult> context = CacheInvocationContextFactory.createCacheResultInvocationContext(metaHolder);
    // then
    assertNotNull(context.getKeyParameters());
    assertEquals(2, context.getKeyParameters().size());
    assertEquals(String.class, context.getKeyParameters().get(0).getRawType());
    assertEquals(0, context.getKeyParameters().get(0).getPosition());
    assertEquals(param1, context.getKeyParameters().get(0).getValue());
    assertTrue(isAnnotationPresent(context.getKeyParameters().get(0), CacheKey.class));
    assertEquals(Integer.class, context.getKeyParameters().get(1).getRawType());
    assertEquals(2, context.getKeyParameters().get(1).getPosition());
    assertEquals(param3, context.getKeyParameters().get(1).getValue());
    assertTrue(isAnnotationPresent(context.getKeyParameters().get(1), CacheKey.class));
}