class DefaultCommunicationService implements CommunicationService {

    public Direction computeDirectionToRemove(boolean hasIncomingRelationship, boolean hasOutgoingRelationship) {
        if (hasIncomingRelationship && hasOutgoingRelationship) {
            return null;
        }

        if (hasIncomingRelationship) {
            return Direction.INCOMING;
        }

        if (hasOutgoingRelationship) {
            return Direction.OUTGOING;
        }

        return Direction.BOTH;
    }

}