AxiomValueGatherer { void addProperties(Map<Assertion, Set<Value<?>>> properties, URI context) { if (propertiesToAdd == null) { this.propertiesToAdd = new HashMap<>(properties.size()); } appendProperties(propertiesToAdd, properties, context); } AxiomValueGatherer(NamedResource subject, URI subjectContext);   }
@Test void testAddPropertiesTwice() throws Exception { final Map<Assertion, Set<Value<?>>> propsOne = new HashMap<>(); propsOne.put(DATA_ASSERTION, new HashSet<>(Arrays.asList(new Value<>("one"), new Value<>("two")))); sut.addProperties(propsOne, null); final Map<Assertion, Set<Value<?>>> propsTwo = new HashMap<>(); propsTwo.put(OBJECT_ASSERTION, Collections.singleton(new Value<>("http: propsTwo.put(DATA_ASSERTION, Collections.singleton(new Value<>("117"))); sut.addProperties(propsTwo, null); final Map<Assertion, Set<Value<?>>> res = OOMTestUtils.getPropertiesToAdd(sut); verifyResultContainsAll(res, propsOne); verifyResultContainsAll(res, propsTwo); }