long primaryKey = RandomUtils.nextLong(0,Long.MAX_VALUE);
PropertyMeta pm = mock(PropertyMeta.class, RETURNS_DEEP_STUBS);
PropertyMeta counterMeta = mock(PropertyMeta.class, RETURNS_DEEP_STUBS);
Object value = new Object();
CompleteBean entity = CompleteBeanTestBuilder.builder().id(primaryKey).name("name").buid();
proxifier = spy(proxifier);
doReturn(interceptor).when(proxifier).buildInterceptor(eq(context), eq(entity), anySetOf(Method.class));
when(context.getEntityMeta()).thenReturn(entityMeta);
when(entityMeta.getIdMeta()).thenReturn(idMeta);
when(entityMeta.getAllMetasExceptCounters()).thenReturn(Arrays.asList(pm));
when(entityMeta.getAllCounterMetas()).thenReturn(Arrays.asList(counterMeta));
when(pm.forValues().getValueFromField(entity)).thenReturn(value);
when(context.getConfigContext()).thenReturn(configContext);
when(factory.createProxyClass(entity.getClass(), configContext)).thenReturn((Class) entity.getClass());
when(instantiator.instantiate(Mockito.<Class<Factory>>any())).thenReturn(realProxy);
Object proxy = proxifier.buildProxyWithAllFieldsLoadedExceptCounters(entity, context);
assertThat(proxy).isNotNull();