ResubscribeHelper { static void initializeAutoTaggingAndResubscriptionInTargetClassOnly(Object target, Class<?> targetClass, ObservableGroup group) { Constructor<?> constructor = findConstructorForClass(targetClass); if (constructor == null) { return; } invokeConstructor(constructor, target, group); }    }
@Test public void leafClassOnlyInitDoesNotInitializeEntireHierarchy() { LeafClass leafClass = new LeafClass(); ResubscribeHelper.initializeAutoTaggingAndResubscriptionInTargetClassOnly(leafClass, LeafClass.class, new ObservableGroup(1)); assertThat(leafClass.baseInitialized).isFalse(); assertThat(leafClass.middleInitialized).isFalse(); assertThat(leafClass.leafInitialized).isTrue(); }