Keys { static String getLazyKey(String key) { int start = startOfType(key); if (substringStartsWith(key, start, LAZY_PREFIX)) { return extractKey(key, start, key.substring(0, start), LAZY_PREFIX); } else { return null; } } Keys(); static String get(Type type); static String getMembersKey(Class<?> key); static String getSetKey(Type type, Annotation[] annotations, Object subject); static String get(Type type, Annotation[] annotations, Object subject); static boolean isAnnotated(String key); static String getClassName(String key); static boolean isPlatformType(String name);  }
@Test public void testAnnotatedGetLazyKey() throws NoSuchFieldException { assertThat(Keys.getLazyKey(fieldKey("lazyAnnotatedString"))) .isEqualTo(fieldKey("eagerAnnotatedString")); }
@Test public void testGetLazyKey() throws NoSuchFieldException { assertThat(Keys.getLazyKey(fieldKey("lazyString"))).isEqualTo(fieldKey("eagerString")); }
@Test public void testGetLazyKey_WrongKeyType() throws NoSuchFieldException { assertThat(Keys.getLazyKey(fieldKey("providerOfTypeAnnotated"))).isNull(); }