class NetworkBBUtils {

    public boolean isRelationshipRelatedToExists(Optional<org.onap.aai.domain.yang.L3Network> l3network,
            String relatedToValue) {
        boolean isRelatedToExists = false;
        if (l3network.isPresent()) {
            List<org.onap.aai.domain.yang.Relationship> relationshipList =
                    l3network.get().getRelationshipList().getRelationship();
            for (org.onap.aai.domain.yang.Relationship relationship : relationshipList) {
                if (relationship.getRelatedTo().equals(relatedToValue)) {
                    isRelatedToExists = true;
                    break;
                }
            }
        }
        return isRelatedToExists;
    }

}