EntityMeta meta = new EntityMeta();
PropertyMeta pm = mock(PropertyMeta.class, RETURNS_DEEP_STUBS);
when(context.<CompleteBean>getEntityClass()).thenReturn(CompleteBean.class);
when(context.getEntityMeta()).thenReturn(meta);
when(pm.forCache().extractClusteredFieldsIfNecessary()).thenReturn(Sets.newLinkedHashSet("id", "a", "b"));
when(cache.getIfPresent(cacheKeyCaptor.capture())).thenReturn(ps);
PreparedStatement actual = manager.getCacheForFieldSelect(session, cache, context, pm);
assertThat(actual).isSameAs(ps);