InstanceDescriptorFactory { public static <T> InstanceDescriptor<T> createNotLoaded(T instance, EntityType<T> et) { return new InstanceDescriptor<>(instance, et); } private  InstanceDescriptorFactory(); static InstanceDescriptor<T> createNotLoaded(T instance, EntityType<T> et); static InstanceDescriptor<T> createAllLoaded(T instance, EntityType<T> et); static InstanceDescriptor<T> create(T instance, EntityType<T> et); static InstanceDescriptor<T> createCopy(T instance, InstanceDescriptor<T> original);  }
@Test void createNotLoadedCreatesInstanceDescriptorWithAttributesInNotLoadedState() { final OWLClassM instance = new OWLClassM(); final InstanceDescriptor<OWLClassM> result = InstanceDescriptorFactory .createNotLoaded(instance, metamodelMocks.forOwlClassM().entityType()); assertNotNull(result); metamodelMocks.forOwlClassM().entityType().getAttributes() .forEach(att -> assertEquals(LoadState.NOT_LOADED, result.isLoaded(att))); assertEquals(LoadState.LOADED, result.isLoaded(metamodelMocks.forOwlClassM().identifier())); }