-
- static SchemaContext SCHEMA_CONTEXT;
- static DatastoreContextIntrospectorFactory INTROSPECTOR_FACTORY;
-
- static {
- final ModuleInfoBackedContext moduleContext = ModuleInfoBackedContext.create();
- try {
- moduleContext.addModuleInfos(Arrays.asList(
- BindingReflections.getModuleInfo(DataStorePropertiesContainer.class)));
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- SCHEMA_CONTEXT = moduleContext.tryToCreateSchemaContext().get();
-
- DOMSchemaService mockSchemaService = mock(DOMSchemaService.class);
- doReturn(SCHEMA_CONTEXT).when(mockSchemaService).getGlobalContext();
- INTROSPECTOR_FACTORY = new DatastoreContextIntrospectorFactory(mockSchemaService,
- GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy());
- }
+ static final DatastoreContextIntrospectorFactory INTROSPECTOR_FACTORY = new DatastoreContextIntrospectorFactory(
+ new BindingCodecContext(BindingRuntimeHelpers.createRuntimeContext(DataStorePropertiesContainer.class)));