ODataEdmRegistryImpl implements ODataEdmRegistry { @Override public synchronized void registerClasses(List<Class<?>> registerClasses) { LOG.debug("registerClasses: classes={}", registerClasses); this.classes.addAll(registerClasses); entityDataModel = null; }  @Override synchronized void registerClasses(List<Class<?>> registerClasses); @Override synchronized EntityDataModel getEntityDataModel();  }
@Test public void testRegisterClasses() throws ODataException { registry.registerClasses(Arrays.asList(Address.class, Category.class, Customer.class, ExampleFlags.class, Order.class, OrderLine.class, Product.class)); EntityDataModel entityDataModel = registry.getEntityDataModel(); assertThat(entityDataModel.getSchemas().size(), is(2)); Schema schema = entityDataModel.getSchema("ODataDemo"); assertNotNull(schema); assertThat(schema.getTypes().size(), is(6)); }