### Question:
ParentTriplesMapper { Set<Resource> map(Set<Pair<String, Object>> joinValues) { if (joinValues.isEmpty()) { return ImmutableSet.of(); } Set<Resource> results = new LinkedHashSet<>(); getIterator.get().forEach(e -> map(e, joinValues) .forEach(results::add)); return results; } ParentTriplesMapper(
		TermGenerator<Resource> subjectGenerator,
		TriplesMapperComponents<T> trMapperComponents
	);   ParentTriplesMapper(
		TermGenerator<Resource> subjectGenerator,
		Supplier<Iterable<T>> getIterator,
		LogicalSourceResolver.ExpressionEvaluatorFactory<T> expressionEvaluatorFactory
	);   }### Answer:
@Test public void parentTriplesMapper_givenJoinConditions() { when(getIterator.get()).thenReturn(ImmutableList.of(entry)); when(expressionEvaluatorFactory.apply(entry)).thenReturn(evaluate); when(subjectGenerator.apply(evaluate)).thenReturn(ImmutableList.of(SKOS.CONCEPT)); ParentTriplesMapper<Object> mapper = new ParentTriplesMapper<>(subjectGenerator, getIterator, expressionEvaluatorFactory); Set<Resource> resources = mapper.map(joinValues); assertThat(resources.size(), is(1)); assertThat(SKOS.CONCEPT, is(in(resources))); }
@Test public void parentTriplesMapper_givenMultiJoinWithNullValues_ShouldStillResolveJoin() { when(getIterator.get()).thenReturn(ImmutableList.of(entry)); when(expressionEvaluatorFactory.apply(entry)).thenReturn(evaluate); when(subjectGenerator.apply(evaluate)).thenReturn(ImmutableList.of(SKOS.CONCEPT)); ParentTriplesMapper<Object> mapper = new ParentTriplesMapper<>(subjectGenerator, getIterator, expressionEvaluatorFactory); Set<Resource> resources = mapper.map(multiJoinValues); assertThat(resources.size(), is(1)); assertThat(SKOS.CONCEPT, is(in(resources))); }