PluralDataPropertyStrategy extends DataPropertyFieldStrategy<AbstractPluralAttribute<? super X, ?, ?>, X> { @Override void buildInstanceFieldValue(Object instance) { if (!values.isEmpty()) { setValueOnInstance(instance, values); } } PluralDataPropertyStrategy(EntityType<X> et, AbstractPluralAttribute<? super X, ?, ?> att,
                               Descriptor attributeDescriptor, EntityMappingHelper mapper);   }
@Test void addValueFromAxiomAddsAllValuesToTheCollection() { final PluralDataPropertyStrategy<OWLClassM> strategy = createStrategyForM(); final Set<Integer> values = addValuesFromAxioms(strategy); final OWLClassM m = new OWLClassM(); strategy.buildInstanceFieldValue(m); assertEquals(values, m.getIntegerSet()); }
@Test void buildFieldValueDoesNothingWhenNoValuesWereAdded() { final PluralDataPropertyStrategy<OWLClassM> strategy = createStrategyForM(); final OWLClassM m = new OWLClassM(); strategy.buildInstanceFieldValue(m); assertNull(m.getIntegerSet()); }