class MissingDefPrefixNoViolationPredicate implements ViolationPredicate {

    @Override
    public Optional<Boolean> apply(Overlap overlap) {
        Set<Edge> missingDirectConnectionEdges = overlap.getMissingEdges().stream()
                .filter(Edge::isDirect)
                .filter(edge -> connectsToMappedNode(overlap, edge))
                .collect(Collectors.toSet());

        if (haveSingleSource(missingDirectConnectionEdges) && haveDefiningSource(missingDirectConnectionEdges)) {
            return Optional.of(false);
        } else {
            return Optional.empty();
        }
    }

}