DefaultIdStrategy extends IdStrategy { @SuppressWarnings("unchecked") private <T> HasSchema<T> getSchemaWrapper(String className, boolean load) { HasSchema<T> hs = (HasSchema<T>) pojoMapping.get(className); if (hs == null) { if (!load) return null; final Class<T> typeClass = RuntimeEnv.loadClass(className); hs = new Lazy<T>(typeClass, this); final HasSchema<T> last = (HasSchema<T>) pojoMapping.putIfAbsent( typeClass.getName(), hs); if (last != null) hs = last; } return hs; } DefaultIdStrategy();  DefaultIdStrategy(IdStrategy primaryGroup, int groupId);  DefaultIdStrategy(int flags);  DefaultIdStrategy(int flags, IdStrategy primaryGroup, int groupId); boolean registerPojo(Class<T> typeClass, Schema<T> schema); boolean registerPojo(Class<T> typeClass); boolean registerEnum(Class<T> enumClass); boolean registerDelegate(Delegate<T> delegate); boolean registerDelegate(String className, Delegate<T> delegate); boolean registerCollection(CollectionSchema.MessageFactory factory); boolean registerMap(MapSchema.MessageFactory factory); boolean map(Class<? super T> baseClass, Class<T> typeClass); @Override boolean isDelegateRegistered(Class<?> typeClass); @Override @SuppressWarnings("unchecked") HasDelegate<T> getDelegateWrapper(Class<? super T> typeClass); @Override @SuppressWarnings("unchecked") Delegate<T> getDelegate(Class<? super T> typeClass); @Override boolean isRegistered(Class<?> typeClass); @Override @SuppressWarnings("unchecked") HasSchema<T> getSchemaWrapper(Class<T> typeClass, boolean create);  }
@Test public void privateConstructors() { HasSchema<TestMessage> schema = strategy.getSchemaWrapper(TestMessage.class, true); assertEquals(TestMessage.SCHEMA, schema.getSchema()); }